Add gitFlowFinishArgs config option for git flow finish#5375
Open
Xyerophyte wants to merge 1 commit intojesseduffield:masterfrom
Open
Add gitFlowFinishArgs config option for git flow finish#5375Xyerophyte wants to merge 1 commit intojesseduffield:masterfrom
Xyerophyte wants to merge 1 commit intojesseduffield:masterfrom
Conversation
Allow users to pass extra arguments to git flow finish via a new gitFlowFinishArgs config option. This is useful for teams that need flags like --keepremote to prevent remote branch deletion after finishing a git flow branch. Closes jesseduffield#5296 Made-with: Cursor
There was a problem hiding this comment.
Pull request overview
Adds a new user-configurable git.gitFlowFinishArgs option to append extra arguments to git flow <type> finish <name>, enabling teams to customize git-flow finish behavior (e.g. keeping remote branches) without changing default behavior.
Changes:
- Introduces
GitFlowFinishArgs []stringinGitConfigwith an empty default. - Appends configured args when building the
git flow ... finishcommand. - Extends tests, schema, and docs to cover and document the new option.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| schema-master/config.json | Adds JSON schema entry for gitFlowFinishArgs under git. |
| pkg/config/user_config.go | Adds GitFlowFinishArgs to GitConfig and sets default to an empty slice. |
| pkg/commands/git_commands/flow.go | Appends GitFlowFinishArgs to the git flow <type> finish command argv. |
| pkg/commands/git_commands/flow_test.go | Adds test scenarios for single/multiple extra args and threads userConfig into deps. |
| docs-master/Config.md | Documents the new gitFlowFinishArgs option and its default. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gitFlowFinishArgsconfig option undergit:that accepts a list of extra arguments to append togit flow <type> finish <name>--keepremoteor--keeplocalto control post-finish behaviorCloses #5296
Example config
Changes
GitFlowFinishArgs []stringfield toGitConfigwith empty defaultgit flow finishcommand via theArg()builderTest plan
--keepremote) is appended--keepremote --keeplocal) are appendedMade with Cursor