Allow custom merge strategies
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest7 patches 11 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/7 | Make is_git_command() usable outside builtin-helpMakefile help.c help.h | +21 | 4 replies | |
| 2/7 | builtin-help: change the current directory back in list_commands_in_dir()help.c | +3 | 4 replies | |
| 3/7 | builtin-help: make list_commands() a bit more generichelp.c help.h | +11 | 0 replies | |
| 3/7 | builtin-help: make list_commands() a bit more generichelp.c help.h | +6 | 1 reply | |
| 4/7 | builtin-merge: allow using a custom strategybuiltin-merge.c | +12 | 0 replies | |
| 5/7 | Add a new test for using a custom merge strategyt/ | +45 | 0 replies | |
| 6/7 | builtin-help: make it possible to exclude some commands in list_commands()help.c help.h | +23 | 0 replies | |
| 7/7 | builtin-merge: avoid non-strategy git-merge commands in error messagebuiltin-merge.c | +13 | 0 replies | |
| 7/7 | builtin-merge: avoid non-strategy git-merge commands in error messagebuiltin-merge.c | +12 | 6 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/7] Allow custom merge strategies
Hi,
This series adds support for custom merge strategies.
The first 3 patches modify builtin-help to allow using it from other builtins. This is necessary because in the error message of 'git merge -s foobar' we show something like 'git help -a', but we list only merge strategies. A command is considered a merge strategy if it has a git-merge- prefix and is listed in the all_strategy array or it is somewhere in PATH, but outside git --exec-path, so that git-merge-ours and other strategies are shown, git-merge-index and other git-merge-named (but not strategy) commands are hidden.
The last two is about removing those problematic 'git-merge-index', 'git-merge-tree' and other bogus commands from the output of 'git merge -s foobar'. I think the benefit of doing it that way is that we don't have to maintain a list of commands which are named git-merge-foo but not strategies _and_ the custom strategies can have a form of git-merge-foo, without adding extra complexity (like forcing users to name them git-merge-custom-foo).
NOTE: At the moment the custom strategies are named as git-merge-foo as well, mainly because I think it's not that problematic to exclude the already existing git-merge-fo non-strategy commands, but this can be changed to git-merge-strategy-foo if we really want so.
Also, I'm aware that this is a feature and we are in rc freeze, I just did not want to keep back this series till 1.6.0 is out.
Miklos Vajna (7):
Make is_git_command() usable outside builtin-help
builtin-help: change the current directory back in
list_commands_in_dir()
builtin-help: make list_commands() a bit more generic
builtin-merge: allow using a custom strategy
Add a new test for using a custom merge strategy
builtin-help: make it possible to exclude some commands in
list_commands()
builtin-merge: avoid non-strategy git-merge commands in error message
Makefile | 1 + builtin-merge.c | 30 +++++++++++++++++++++------ help.c | 50 ++++++++++++++++++++++++---------------------- help.h | 19 +++++++++++++++++ t/t7606-merge-custom.sh | 45 ++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 114 insertions(+), 31 deletions(-) create mode 100644 help.h create mode 100755 t/t7606-merge-custom.sh