Commit Graph

86 Commits

Author SHA1 Message Date
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
7124a72efb this is a change
bruh
2025-06-13 16:50:02 +02:00
80f72faa50 this is a test of line staging and comitting
bruh
2025-06-13 16:49:15 +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
559f35de5f fix: improve UI responsiveness during git operations
- Fix show_error_popup() getmaxyx parameter order bug
- Update branch view immediately after amend operations with get_ncurses_git_branches()
- Fix push operation displaying only branch pane during force push dialog
- Remove aggressive screen clearing from commit dialog to prevent UI flicker
- Optimize post-commit refresh to only update changed windows

These changes eliminate jarring full-screen redraws and make git operations
feel much more responsive and smooth.
2025-06-11 18:30:59 +02:00
ab6ed8a274 this is a test
lkjasdlkj
2025-06-11 18:24:28 +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
3a60f77832 this is also a test 2025-06-09 11:54:32 +02:00
caa161e8a3 test commit 2025-06-09 11:53:24 +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
e41c0aed6c Refactor git operations: move pull to branches, add status indicators, and improve UX
Major improvements to git operations UI and user experience:

**Git Operations Restructure:**
- Move pull functionality from commit view to branch view (pull only makes sense for branches)
- Remove 'p' key from commit list mode, add to branch list mode with validation
- Only allow pull when branch has commits behind (prevents unnecessary operations)

**Branch Status Indicators:**
- Add ahead/behind commit indicators (/) next to each branch
- Show 2 for branches 2 commits ahead, 3 for 3 commits behind
- Display combined status like 12 for diverged branches
- Fetch remote refs automatically to ensure accurate status

**Real-time Operation Feedback:**
- Add branch-specific animations during push/pull operations
- Show Pushing
2025-06-08 23:55:21 +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
f1caa3a6a3 testing again 2025-06-08 22:09:15 +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