Skip to content

Commit

Permalink
Disable git verbose commits and abbreviated rebase commands by default
Browse files Browse the repository at this point in the history
Disabling verbose commits and abbreviated commands in rebase ensures that the `spr_reword_helper` is able to correctly detect and amend commits with a `commit-id`.
  • Loading branch information
chriscz authored Aug 22, 2024
1 parent e2eb786 commit e0b0a5a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git/realgit/realcmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ func (c *gitcmd) GitWithEditor(argStr string, output *string, editorCmd string)
if c.config.User.LogGitCommands {
fmt.Printf("> git %s\n", argStr)
}
args := []string{"-c", fmt.Sprintf("core.editor=%s", editorCmd)}
args := []string{
"-c", fmt.Sprintf("core.editor=%s", editorCmd),
"-c", "commit.verbose=false",
"-c", "rebase.abbreviateCommands=false",
}
args = append(args, strings.Split(argStr, " ")...)
cmd := exec.Command("git", args...)
cmd.Dir = c.rootdir
Expand Down

0 comments on commit e0b0a5a

Please sign in to comment.