# [PATCH] annotate should number lines starting with 1

3 messages from 2006-03-02 to 2006-03-03. Participants: Luck, Tony, Junio C Hamano.
Thread: https://gitlist.dev/t/3530

## Luck, Tony, 2006-03-02 23:27

Subject: [PATCH] annotate should number lines starting with 1
Message-ID: <200603022327.k22NRVek023304@agluck-lia64.sc.intel.com>
URL: https://gitlist.dev/e/200603022327.k22NRVek023304%40agluck-lia64.sc.intel.com

```
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@intel.com>

---

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 {

```

## Junio C Hamano, 2006-03-03 07:09

Subject: Re: [PATCH] annotate should number lines starting with 1
Message-ID: <7vfym02ee0.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vfym02ee0.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <200603022327.k22NRVek023304@agluck-lia64.sc.intel.com>

```
"Luck, Tony" <tony.luck@intel.com> writes:

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

Thanks.

I agree with this patch 100%, so I am going to take this patch.

But git-cvsserver might need some adjustments.
Martin?

```

## Junio C Hamano, 2006-03-03 07:09

Subject: Re: [PATCH] annotate should number lines starting with 1
Message-ID: <7vek1k2edf.fsf@assigned-by-dhcp.cox.net>
URL: https://gitlist.dev/e/7vek1k2edf.fsf%40assigned-by-dhcp.cox.net
In-Reply-To: <200603022327.k22NRVek023304@agluck-lia64.sc.intel.com>

```
"Luck, Tony" <tony.luck@intel.com> writes:

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

Thanks.

I agree with this patch 100%, so I am going to take this patch.

But git-cvsserver might need some adjustments.
Martin?

```
