Skip to content

Add commit:split action and rebase progress indicator#176

Draft
lambdalisue wants to merge 9 commits intomainfrom
add-commit-split-action
Draft

Add commit:split action and rebase progress indicator#176
lambdalisue wants to merge 9 commits intomainfrom
add-commit-split-action

Conversation

@lambdalisue
Copy link
Copy Markdown
Owner

Summary

  • Add commit:split action to interactively split commits via rebase in GinLog, GinReflog, and GinStatus buffers
  • Add rebase progress component and status header to show rebase state (e.g., "REBASE-i 3/10") in statusline and GinStatus buffer
  • Fix buffer reload issue after bare git commands to reflect external changes

Why

Git's commit splitting workflow requires manually running several commands: starting an interactive rebase, marking a commit for editing, resetting it, staging changes incrementally, and continuing the rebase. This is tedious and error-prone for users who want to decompose a large commit into smaller, focused commits.

This PR streamlines the workflow with a single commit:split action that:

  1. Automatically starts an interactive rebase on the target commit
  2. Resets the commit while preserving changes in the working tree
  3. Opens GinStatus so users can immediately stage and commit changes
  4. Preserves user's commit.template across rebase sessions with automatic cleanup

The rebase progress indicator addresses the lack of visual feedback during rebase operations. Users can now see at a glance where they are in a rebase sequence both in the statusline (via component) and in the GinStatus buffer header.

The buffer reload fix ensures that when users run bare git commands via :Gin that modify files, those changes are immediately reflected in open buffers instead of requiring manual :checktime.

Test plan

  • Test commit:split action in GinLog buffer on a commit with multiple changes
  • Test commit:split action in GinReflog buffer
  • Test commit:split action in GinStatus buffer (when available)
  • Verify GinStatus opens after split and shows uncommitted changes
  • Create multiple new commits and run git rebase --continue to verify workflow
  • Verify commit.template is preserved (check with git config commit.template before/after)
  • Verify cleanup occurs automatically after rebase completes
  • Test rebase progress indicator in statusline with gin#component#rebase#ascii()
  • Test rebase progress header appears in GinStatus during rebase
  • Test with both interactive rebase (rebase -i) and non-interactive rebase
  • Verify error handling when rebase is already in progress
  • Test commit:split:split, commit:split:vsplit, commit:split:tabedit openers
  • Run :Gin commit --amend and verify buffer reloads automatically show the change

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Feb 7, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch add-commit-split-action

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.96%. Comparing base (726a2ee) to head (cb11647).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #176   +/-   ##
=======================================
  Coverage   62.96%   62.96%           
=======================================
  Files          24       24           
  Lines        1199     1199           
  Branches      172      172           
=======================================
  Hits          755      755           
  Misses        443      443           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lambdalisue lambdalisue force-pushed the add-commit-split-action branch from ea800a1 to cb11647 Compare February 7, 2026 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant