Re: [PATCH] git-blame: Kill warning "print_map defined but not used"

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

 



Linus Torvalds <torvalds@xxxxxxxx> writes:

>  - you should use "-u -U 0" instead of "-u0" to avoid warnings from some 
>    versions of GNU diff

One liner here.

>  - Please default to HEAD so that you don't need to say it.

Fredrik's latest patch already does.

-- >8 --
Subject: [PATCH] blame: avoid "diff -u0".

As Linus suggests, use "diff -u -U 0" instead.

Signed-off-by: Junio C Hamano <junkio@xxxxxxx>

---

 blame.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

1f7d9585190c22a4c019487444d9e461e08baa0e
diff --git a/blame.c b/blame.c
index a3a8ddc..141e4c6 100644
--- a/blame.c
+++ b/blame.c
@@ -92,7 +92,7 @@ static struct patch *get_patch(struct co
 		die("write failed: %s", strerror(errno));
 	close(fd);
 
-	sprintf(diff_cmd, "diff -u0 %s %s", tmp_path1, tmp_path2);
+	sprintf(diff_cmd, "diff -u -U 0 %s %s", tmp_path1, tmp_path2);
 	fin = popen(diff_cmd, "r");
 	if (!fin)
 		die("popen failed: %s", strerror(errno));
-- 
1.2.4.gee5c7


-
: 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]