[PATCH] Allow pickaxe to be used via git log.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Handle the -S option when passed to git log such that only the appropriate
commits are displayed.  Unlike "whatchanged", by default no diff output
is produced.

---

This came out of recent comments on #git and will hopefully further reduce
the need for git-whatchanged.


ecdfaa21dbff93a6a387b02e1f1d3ebf05ee517d
 revision.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

ecdfaa21dbff93a6a387b02e1f1d3ebf05ee517d
diff --git a/revision.c b/revision.c
index 2294b16..2e18b2b 100644
--- a/revision.c
+++ b/revision.c
@@ -743,6 +743,13 @@ int setup_revisions(int argc, const char
 				continue;
 			}
 			opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i);
+			if (revs->diffopt.pickaxe && revs->always_show_header) {
+				revs->always_show_header = 0;
+				revs->diff = 1;
+				revs->diffopt.recursive = 1;
+				if (revs->diffopt.output_format == DIFF_FORMAT_RAW)
+					revs->diffopt.output_format = DIFF_FORMAT_NO_OUTPUT;
+			}
 			if (opts > 0) {
 				revs->diff = 1;
 				i += opts - 1;
-- 
1.3.GIT

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]