added scrolling in the commits pane so that you can view older commits without going into them. also tried adding this to the stashes pane but because of an older bug it broke and is not working right. its added to the things to fix list
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
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
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.
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
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
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
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!!!!
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
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
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