Git development
 help / color / mirror / Atom feed
From: Sean <seanlkml@sympatico.ca>
To: Junio C Hamano <junkio@cox.net>
Cc: git@vger.kernel.org
Subject: [PATCH] Allow pickaxe and diff-filter options to be used by git log.
Date: Fri, 19 May 2006 00:19:20 -0400	[thread overview]
Message-ID: <BAYC1-PASMTP096010F052E9BF78B5FD4AAEA70@CEZ.ICE> (raw)
Message-ID: <20060519001920.42990900.seanlkml@sympatico.ca> (raw)
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>

---

> 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

  reply	other threads:[~2006-05-19  4:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060518213124.6e731eef.seanlkml@sympatico.ca>
2006-05-19  1:31 ` [PATCH] Allow pickaxe to be used via git log Sean
2006-05-19  2:47   ` Junio C Hamano
     [not found]     ` <20060518225612.16c6441f.seanlkml@sympatico.ca>
2006-05-19  2:56       ` Sean
2006-05-19  3:05         ` Junio C Hamano
     [not found]           ` <20060518233803.7e4ca954.seanlkml@sympatico.ca>
2006-05-19  3:38             ` Sean
2006-05-19  3:39   ` Junio C Hamano
     [not found]     ` <20060519001920.42990900.seanlkml@sympatico.ca>
2006-05-19  4:19       ` Sean [this message]
2006-05-19  5:41         ` [PATCH] Allow pickaxe and diff-filter options to be used by " Junio C Hamano
     [not found]           ` <20060519014938.272dd7a1.seanlkml@sympatico.ca>
2006-05-19  5:49             ` Sean
2006-05-19  6:05               ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BAYC1-PASMTP096010F052E9BF78B5FD4AAEA70@CEZ.ICE \
    --to=seanlkml@sympatico.ca \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox