[PATCH] Allow pickaxe and diff-filter options to be used by git log.
- From
Sean <seanlkml@sympatico.ca>
- Date
- May 19, 2006, 04:19 UTC
- Message-ID
- <BAYC1-PASMTP096010F052E9BF78B5FD4AAEA70@CEZ.ICE>
- In-Reply-To
- <7vac9elm2p.fsf@assigned-by-dhcp.cox.net>
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>
---
Show 6 quoted lines
> If your goal is to make whatchanged less necessary, I think you > would need to special case --diff-filter as well for "git log", > although nobody on #git channel seems to have noticed. I often > run --diff-filter=A when I am trying to see when I added a > particular file, to avoid getting distracted by other types of > changes; log would be still shown if do not disable --always.
Makes sense. This patch should cover that case too.
Sean
a2221c07a94bc378ef40182fa6b260ac88804073 builtin-log.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
a2221c07a94bc378ef40182fa6b260ac88804073
diff --git a/builtin-log.c b/builtin-log.c index d5bbc1c..12a6d19 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -23,6 +23,13 @@ static int cmd_log_wc(int argc, const ch 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]);
-- 1.3.GIT