Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH Illustration] branch --contains=<commit>

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:52
Subsystem: the rest · Maintainer: Linus Torvalds

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 <redacted>
---

 * 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help