git-feature: add configurable branch separator#1072
Merged
spacewander merged 2 commits intotj:masterfrom Sep 19, 2023
halostatue:add-feature-branch-separator
Merged
git-feature: add configurable branch separator#1072spacewander merged 2 commits intotj:masterfrom halostatue:add-feature-branch-separator
spacewander merged 2 commits intotj:masterfrom
halostatue:add-feature-branch-separator
Conversation
hyperupcall
reviewed
Sep 12, 2023
spacewander
reviewed
Sep 16, 2023
Closes #1069 This allows the use of a separator other than `/` for feature or other alias branches. While a command-line option has been provided (`-s` or `--separator`), this will most often be used via `git-extras.feature.separator`.
- Changed option parsing so that `--alias` requires an argument and will
fail with an error unless provided. Applied the same logic to
`--separator`.
- Changed `finish` parsing to capture it as a variable flag during
argument parsing.
This could be extended so that if `finish` is already true, a second
`finish` results in the word being added to the argument list.
```console
$ git feature -- finish remote
$ git feature finish finish remote
```
This has not been done because it is a bit of an inconsistent handling
for documentation purposes.
- Add handling of `--` to permit options or `finish` to be made part of
the feature branch name.
- Since `finish` is now a variable flag, simplify the name-building
logic to always use `concatargs "${argv[@]}"`. This means that
`git feature finish ...` and `git feature ...` behave the same in
terms of feature branch name building.
- Basically rewrote the man page to include better descriptions of the
options as well as adding a GIT CONFIG section and additional EXAMPLES
for the new features/behaviour.
spacewander
approved these changes
Sep 18, 2023
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.
Closes #1069
This allows the use of a separator other than
/for feature or otheralias branches. While a command-line option has been provided (
-sor--separator), this will most often be used viagit-extras.feature.separator.