Commit Graph

78 Commits

Author SHA1 Message Date
da321d1271 fixed border rendering issues
after i added the * indicator to commits and stashes, the left borded dissapeared, i forgot to indent the line with one to make space for the indicators.

fixed text in the view pane to stop / wrap before the last line, meaning that the last character is not in the border anymore
2025-06-15 16:06:28 +02:00
28308c8977 updating grep for commits and stashes
when grepping for commits, searching for author initials is now possible, and will be prioritized first. this means typing ma for marcus for example will give you all commits from marcus. if no hits are found on initials it will apply that grep to the name/titles. also some highlighing has been added to commit grep

updated stash grep to include possiblility to grep for time and branches. this means you can filter for branches and times
2025-06-15 02:28:21 +02:00
dbf227a4fd adding grep to branches commits and stashes 2025-06-15 02:12:04 +02:00
3c80727058 added actual fzf for files, fully working and looks nice!! 2025-06-15 02:03:21 +02:00
9b38ef8765 adding primative fzf features to file list 2025-06-15 01:52:13 +02:00
453334de07 just updating the view because it broke a lil 2025-06-15 01:29:23 +02:00
8476645a31 fix: Prevent commit message crashes from special characters
Replace shell command string building with temp file approach for commit
messages to prevent crashes from special characters, quotes, backticks,
and newlines.

Changes:
- Use `git commit -F tempfile` instead of `git commit -m "message"`
- Write commit messages to temporary files before passing to git
- Updated commit_marked_files(), commit_staged_changes_only(), and amend_commit()
- Eliminates shell command injection vulnerabilities
- Supports unlimited message length and any special characters

Fixes crashes when commit messages contain backticks, quotes, newlines,
or other shell metacharacters that were previously breaking the shell
command construction.
2025-06-13 16:48:13 +02:00
9fe5ad1af3 updated the commit size 2025-06-13 16:41:18 +02:00
f59381f929 feat: Add interactive line-by-line staging to ncurses diff viewer
Implement comprehensive interactive staging functionality that allows
users
to stage and unstage individual lines, similar to `git add -p` but with
a
visual interface.

New features:
- Split view mode showing unstaged changes (left) and staged changes
(right)
- Line-by-line staging: press Space on any diff line to stage/unstage it
- Tab switching between unstaged and staged panes
- Apply staged changes with 'a' key (runs `git apply --cached`)
- Visual indicators for staged vs unstaged content with proper syntax
highlighting
- Interactive unstaging: switch to staged pane and press Space to
unstage lines
- Automatic refresh of git status after staging/unstaging operations
- Proper git integration reading from both working directory and staging
area

Technical implementation:
- Added `load_file_with_staging_info()` to load unstaged changes
(staging vs working)
- Added `rebuild_staged_view_from_git()` to load staged changes (HEAD vs
staging)
- Added `stage_hunk_by_line()` for individual line staging
- Added `unstage_line_from_git()` for removing lines from staging area
- Added `apply_staged_changes()` to apply staged content to git
- Enhanced file content window with split view rendering
- Added proper cursor management for both unstaged and staged panes

This transforms the diff viewer into a full-featured interactive staging
tool,
allowing developers to create atomic commits with only specific lines
rather
than entire files.

Keybindings:
- Enter: Switch to split staging view
- Tab: Switch between unstaged/staged panes
- Space: Stage/unstage current line
- 'a': Apply staged changes to git
- 'c': Commit staged changes
- 'r': Reset staged changes
2025-06-13 16:33:45 +02:00
679ad3a35e added username and PAT prompt if user has not set that up
this is a nice feature
2025-06-12 16:00:29 +02:00
85a35dff58 added coloring and formatting in the commit history in a branch and in the commits 2025-06-11 20:07:55 +02:00
5ebb676890 change: reformatted stashes
stashes now show time ago stats instead of which stash it was. so instead of stash{0} its now 34m On main.

also gave it some formatting so that the name/title of the stash and the branch is inline. also removed the coloring from the name/title in favour of readability
2025-06-11 19:31:05 +02:00
3367abf1a8 removed weird characters being automatically inserted into commit title prompt 2025-06-11 18:55:51 +02:00
a9b866b6ef so a test is here 2025-06-11 18:23:52 +02:00
97c8ae01ad ¬lkasjdf 2025-06-11 18:20:42 +02:00
895800f254 bruh 2025-06-11 18:19:36 +02:00
70f9b161cc this is a test 2025-06-11 18:15:44 +02:00
d1cf9190ee bruh 2025-06-11 18:13:29 +02:00
ab9ef0f6ee bruh 2025-06-11 18:09:19 +02:00
e9f8c86baa wowzers! 2025-06-11 18:04:07 +02:00
f3a50aa94b this is a test bruh 2025-06-11 17:54:00 +02:00
b4216133e6 fixed highligher line going out of bunds (still broken with ctrl+u and ctrl+d though 2025-06-11 12:41:49 +02:00
0c9da6794a not really working 2025-06-11 12:16:06 +02:00
f2db060afa fixed rendering issue with commit prompts
when hitting enter to commit the parts of the prompts that were over empty space in the entire program did not get cleared. this is now fixed and it will remove those parts too
2025-06-11 07:07:48 +02:00
4b48526c25 line highlighter jumps over empty lines 2025-06-11 06:50:35 +02:00
24f6547354 accidentally removed red color for unpushed commits. this is now added back 2025-06-11 06:42:24 +02:00
a7c24f748b added commit history to branches
if you hover over a branc now you can see the commit history on that branch. it will display the hash author date title and message associated with that commit. very good very nice!!!!
2025-06-11 06:37:48 +02:00
4c709fbf80 added dynamic resizing in runtime to git diff
the program would bug out when resized and you would have to quit the entire shell and reload it back up just to get a resized gg dd. this is now fixed and you can resize any time you want, even in runtime
2025-06-09 12:16:16 +02:00
3d00a3848f this is a test of the commits not working during critical operations
halla balla
2025-06-09 11:51:52 +02:00
b617911951 fixed cursor resetting when fetching
fixed a bug where the users position in a file would get reset to the top after a fetch. this was incredibily annoying when deep down in a diff file
2025-06-09 11:22:06 +02:00
a26ca8ab46 ¬this is getting annoying 2025-06-08 23:48:24 +02:00
64885d2594 test commit 2025-06-08 23:42:48 +02:00
53493cd3e5 halla mann
asdf
2025-06-08 23:37:23 +02:00
ea32cf451f hey world! 2025-06-08 23:26:18 +02:00
29440916ae bruh commit
lkjasdflkjsadflkjasdflkj
2025-06-08 23:20:29 +02:00
b4b16d902b lkjhasdf
lkjasdf
2025-06-08 23:16:02 +02:00
e166bc23fb halla
lkajsdf
2025-06-08 23:13:36 +02:00
7ca2268876 test commit
bruh
2025-06-08 23:04:19 +02:00
97e1e84c2d test commit
halla balla
2025-06-08 22:28:53 +02:00
37aed5b7a3 these are some changes
im getting sick of git
2025-06-08 22:15:09 +02:00
8a986698f8 this is a test commit for the branch hot reloading
halla balla!
2025-06-08 22:08:20 +02:00
5695b574ca fixed incorrect fetching for git branch status
the ahead and behind wasnt working in the branch view, also pulling didnt work so the entire feature was broken, this is now fixed and works as expected atleast for the small test case i gave it
2025-06-08 22:01:56 +02:00
7b9e31b478 hopefully fixed the pushing
added the pushing to the branch, hoping it will show up as 1 behind when i get my laptop and make a change
2025-06-08 21:35:42 +02:00
bdf6dffe51 test commit 2025-06-08 01:52:42 +02:00
bcdacfb8c3 this is a test 2025-06-08 01:50:07 +02:00
f1b98418d9 added asking for upstream when branch lost upstream
pushing broke when upstream was not defined. this is now fixed.
2025-06-08 01:43:00 +02:00
3bb9f7b365 this is a test 2025-06-08 01:33:09 +02:00
51c5c4a202 testing pushing after it broke
it broke :(
2025-06-08 01:29:07 +02:00
659b7a0353 added branches pane
added branches pane with the core branch functionality
2025-06-08 01:25:00 +02:00
8a71a5f16b this is another commit test
hello
2025-06-07 14:50:27 +02:00