Allow pickaxe and diff-filter options to be used by git log.
Handle the -S option when passed to git log such that only the appropriate commits are displayed. Also per Junio's comments, do the same for "--diff-filter", so that it too can be used as an option to git log. By default no patch or diff information is displayed. Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca> Signed-off-by: Junio C Hamano <junkio@cox.net>
Sean committed
May 19, 2006 at 00:19 UTC
582af688157607f05447cefce8d91b26eeaee39d
1 file changed
+7
builtin-log.c
+7
@@ -19,6 +19,13 @@ static int cmd_log_wc(int argc, const char **argv, char **envp,
19
rev->commit_format = CMIT_FMT_DEFAULT;
20
rev->verbose_header = 1;
21
argc = setup_revisions(argc, argv, rev, "HEAD");
22
+ if (rev->always_show_header) {
23
+ if (rev->diffopt.pickaxe || rev->diffopt.filter) {
24
+ rev->always_show_header = 0;
25
+ if (rev->diffopt.output_format == DIFF_FORMAT_RAW)
26
+ rev->diffopt.output_format = DIFF_FORMAT_NO_OUTPUT;
27
+ }
28
+ }
29
30
if (argc > 1)
31
die("unrecognized argument: %s", argv[1]);