[PATCH] annotate should number lines starting with 1

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

 



C programmers are well used to counting from zero, but every
other text file tool starts counting from 1.

Signed-off-by: Tony Luck <tony.luck@xxxxxxxxx>

---

diff --git a/git-annotate.perl b/git-annotate.perl
index 08d479f..d93ee19 100755
--- a/git-annotate.perl
+++ b/git-annotate.perl
@@ -128,7 +128,7 @@ foreach my $l (@filelines) {
 	}
 
 	printf("%s\t(%10s\t%10s\t%d)%s\n", $rev, $committer,
-		format_date($date), $i++, $output);
+		format_date($date), ++$i, $output);
 }
 
 sub init_claim {
-
: 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]