All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: "Martin Langhoff" <martin.langhoff@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-annotate dies when a patch is missing trailing newline
Date: Wed, 01 Mar 2006 18:23:12 -0800	[thread overview]
Message-ID: <7vslq1d1pr.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <46a038f90603011653l7956d5dat99d88a7da98d21b6@mail.gmail.com> (Martin Langhoff's message of "Thu, 2 Mar 2006 13:53:21 +1300")

"Martin Langhoff" <martin.langhoff@gmail.com> writes:

> git-annotate is dying when a patch is missing trailing newline. There
> _are_ valid situations where code files are not expected to have
> trailing newlines. Just thing of that glorious programming language,
> PHP.

Does this help?

---
diff --git a/git-annotate.perl b/git-annotate.perl
index f9c2c6c..d30eba7 100755
--- a/git-annotate.perl
+++ b/git-annotate.perl
@@ -304,6 +304,10 @@ sub _git_diff_parse {
 			}
 			$ri++;
 
+		} elsif (m/^\\/) {
+	
+			; # ignore for now...
+
 		} else {
 			if (substr($_,1) ne get_line($slines,$ri) ) {
 				die sprintf("Line %d (%d) does not match:\n|%s\n|%s\n%s => %s\n",

  parent reply	other threads:[~2006-03-02  2:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-02  0:53 git-annotate dies when a patch is missing trailing newline Martin Langhoff
2006-03-02  1:53 ` Ryan Anderson
2006-03-02  2:07   ` Junio C Hamano
2006-03-02  2:23 ` Junio C Hamano [this message]
2006-03-02  3:07   ` Martin Langhoff
2006-03-02  3:37     ` Junio C Hamano
2006-03-02  4:10       ` Martin Langhoff

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=7vslq1d1pr.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=git@vger.kernel.org \
    --cc=martin.langhoff@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.