[PATCH Illustration] branch --contains=<commit>
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 19, 2007, 08:04 UTC
- Message-ID
- <7vsl32oe48.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <7v4pfircka.fsf@gitster.siamese.dyndns.org>
This renames the --with=<commit> option to --contains=<commit>, but still supports the earlier --with=<commit> variant as a hidden synonym.
Signed-off-by: Junio C Hamano <gitster@pobox.com> ---
* An example usage of the ".help = NULL" member in the options structure.
builtin-branch.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/builtin-branch.c b/builtin-branch.c index fd36e4f..5dc0c57 100644 --- a/builtin-branch.c +++ b/builtin-branch.c @@ -562,9 +562,12 @@ int cmd_branch(int argc, const char **argv, const char *prefix) OPT_BOOLEAN( 0 , "color", &branch_use_color, "use colored output"), OPT_SET_INT('r', NULL, &kinds, "act on remote-tracking branches", REF_REMOTE_BRANCH), - OPT_CALLBACK(0, "with", &with_commit, "commit", + OPT_CALLBACK(0, "contains",&with_commit, "commit", "print only branches that contain the commit", opt_parse_with_commit), + OPT_CALLBACK(0, "with", &with_commit, "commit", + NULL, + opt_parse_with_commit), OPT__ABBREV(&abbrev), OPT_GROUP("Specific git-branch actions:"),
-- 1.5.3.6.1788.gcc5c4