Skip to content

fix(git): auto-accept commit message when continuing rebase#71

Merged
boneskull merged 1 commit intomainfrom
issue-49
Apr 8, 2026
Merged

fix(git): auto-accept commit message when continuing rebase#71
boneskull merged 1 commit intomainfrom
issue-49

Conversation

@boneskull
Copy link
Copy Markdown
Owner

Closes #49

@boneskull
Copy link
Copy Markdown
Owner Author

📚 Pull Request Stack


Managed by gh-stack

@claude
Copy link
Copy Markdown

claude bot commented Apr 8, 2026

Claude finished @boneskull's task in 1m 9s —— View job


Code Review

  • Gather context
  • Read changed file and diff
  • Provide review feedback

Summary: This is a minimal, correct fix. The change is a single line in internal/git/git.go:290.

The change:

- return g.runInteractive("rebase", "--continue")
+ return g.runInteractive("-c", "core.editor=true", "rebase", "--continue")

This passes -c core.editor=true to git, setting the editor to the Unix true command (which exits immediately with code 0) for this single invocation only. When git rebase --continue needs to open an editor to confirm a commit message, it runs true instead — effectively auto-accepting the existing message without blocking.

Assessment: Correct and appropriate. The -c flag is the right mechanism here because it scopes the config override to a single invocation without modifying the user's git config.


Observations:

  1. Windows compatibilitytrue is a POSIX command. On Windows, this works in practice because Git for Windows ships true in Git Bash, but it's a subtle assumption. No action needed unless Windows is an explicitly supported target.

  2. No tests for RebaseContinue — There's no test coverage for this function (confirmed by searching *_test.go). This is understandable since testing interactive git rebase flows is difficult. Not a blocker.

  3. Consistency with other rebase helpersRebaseHere (git.go:381) and RebaseOntoHere (git.go:388) still use plain runInteractive("rebase", ...) without the editor override. If those ever encounter a commit message prompt, they'd block too. That said, initial rebase operations are less likely to hit this than --continue, so the targeted fix makes sense.

No issues blocking merge. The fix is minimal, safe, and solves a real UX problem in the gh stack continue flow.

@boneskull boneskull merged commit 4e4fbb8 into main Apr 8, 2026
9 checks passed
@boneskull boneskull deleted the issue-49 branch April 8, 2026 03:23
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.

continue command should not pop an editor after resolution

1 participant