Skip to content

Commit

Permalink
support configurable merge args
Browse files Browse the repository at this point in the history
  • Loading branch information
jesseduffield committed Apr 20, 2020
1 parent e9f2885 commit 304607a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docs/Config.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ Default path for the config file:
merging:
# only applicable to unix users
manualCommit: false
# extra args passed to `git merge`, e.g. --no-ff
args: ""
skipHookPrefix: WIP
autoFetch: true
update:
Expand Down
3 changes: 2 additions & 1 deletion pkg/commands/git.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,8 @@ func (c *GitCommand) ListStash() (string, error) {

// Merge merge
func (c *GitCommand) Merge(branchName string) error {
return c.OSCommand.RunCommand("git merge --no-edit %s", branchName)
mergeArgs := c.Config.GetUserConfig().GetString("git.merging.args")
return c.OSCommand.RunCommand("git merge --no-edit %s %s", mergeArgs, branchName)
}

// AbortMerge abort merge
Expand Down
1 change: 1 addition & 0 deletions pkg/config/app_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@ git:
useConfig: false
merging:
manualCommit: false
args: ""
skipHookPrefix: 'WIP'
autoFetch: true
update:
Expand Down

0 comments on commit 304607a

Please sign in to comment.