author | Miklos Vajna <vmiklos@frugalware.org> | |
Tue, 29 Jul 2008 23:16:59 +0000 (01:16 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 30 Jul 2008 06:21:36 +0000 (23:21 -0700) | ||
commit | 87091b495e8af0daf317c0d0e08ac3ead74a0bb9 | |
tree | 25a12eaa8887030ebf1c76a17d19a26512a18fd5 | tree | snapshot |
parent | 940208a771066229bc6a486f6a058e332b71cfe4 | commit | diff |
builtin-merge: allow using a custom strategy
Allow using a custom strategy, as long as it's named git-merge-foo. The
error handling is now done using is_git_command(). The list of available
strategies is now shown by list_commands().
If an invalid strategy is supplied, like -s foobar, then git-merge would
list all git-merge-* commands. This is not perfect, since for example
git-merge-index is not a valid strategy.
These are removed from the output by scanning the list of main commands;
if the git-merge-foo command is listed in the all_strategy list, then
it's shown, otherwise excluded. This does not exclude commands somewhere
else in the PATH, where custom strategies are expected.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Allow using a custom strategy, as long as it's named git-merge-foo. The
error handling is now done using is_git_command(). The list of available
strategies is now shown by list_commands().
If an invalid strategy is supplied, like -s foobar, then git-merge would
list all git-merge-* commands. This is not perfect, since for example
git-merge-index is not a valid strategy.
These are removed from the output by scanning the list of main commands;
if the git-merge-foo command is listed in the all_strategy list, then
it's shown, otherwise excluded. This does not exclude commands somewhere
else in the PATH, where custom strategies are expected.
Signed-off-by: Miklos Vajna <vmiklos@frugalware.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-merge.c | diff | blob | history |