aboutsummaryrefslogtreecommitdiff
path: root/builtin-log.c
diff options
context:
space:
mode:
authorSean <seanlkml@sympatico.ca>2006-05-19 00:19:20 -0400
committerJunio C Hamano <junkio@cox.net>2006-05-19 16:24:51 -0700
commit582af688157607f05447cefce8d91b26eeaee39d (patch)
tree241490d30559e65c61c73f03e9676f1b3049b41e /builtin-log.c
parent405e5b2fe0cf20b0eea41ca892f416c218b49f59 (diff)
downloadgit-582af688157607f05447cefce8d91b26eeaee39d.tar.gz
git-582af688157607f05447cefce8d91b26eeaee39d.tar.xz
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>
Diffstat (limited to 'builtin-log.c')
-rw-r--r--builtin-log.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/builtin-log.c b/builtin-log.c
index 69f2911cb..c4ceee0f9 100644
--- a/builtin-log.c
+++ b/builtin-log.c
@@ -19,6 +19,13 @@ static int cmd_log_wc(int argc, const char **argv, char **envp,
rev->commit_format = CMIT_FMT_DEFAULT;
rev->verbose_header = 1;
argc = setup_revisions(argc, argv, rev, "HEAD");
+ if (rev->always_show_header) {
+ if (rev->diffopt.pickaxe || rev->diffopt.filter) {
+ rev->always_show_header = 0;
+ if (rev->diffopt.output_format == DIFF_FORMAT_RAW)
+ rev->diffopt.output_format = DIFF_FORMAT_NO_OUTPUT;
+ }
+ }
if (argc > 1)
die("unrecognized argument: %s", argv[1]);