Skip to content

Commit

Permalink
Allow pickaxe and diff-filter options to be used by git log.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sean authored and Junio C Hamano committed May 19, 2006
1 parent 405e5b2 commit 582af68
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions builtin-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 582af68

Please sign in to comment.