git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/3] Handle \No newline at end of file.

From
RARyan Anderson <ryan@michonline.com>
Date
Mar 2, 2006, 05:23 UTC
Message-ID
<11412770173208-git-send-email-ryan@michonline.com>
In-Reply-To
<114127659642-git-send-email-ryan@michonline.com>
Signed-off-by: Ryan Anderson <ryan@michonline.com>
---
 git-annotate.perl |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
e30d9ddd62cf016124dd9f32e14809d0a38c69e2
diff --git a/git-annotate.perl b/git-annotate.perl
index f9c2c6c..d6028c9 100755
--- a/git-annotate.perl
+++ b/git-annotate.perl
@@ -304,6 +304,12 @@ sub _git_diff_parse {
 			}
 			$ri++;
 
+		} elsif (m/^\\/) {
+			;
+			# Skip \No newline at end of file.
+			# But this can be internationalized, so only look
+			# for an initial \
+
 		} 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",
-- 
1.2.2.g1070
Next: Ryan Anderson
Message 1 of 3 in “Handle \No newline at end of file.”
  1. 1/3 Handle \No newline at end of file.Ryan Anderson, Mar 2, 2006
  2. 2/3 annotate: Add a basic set of test cases.Ryan Anderson, Mar 2, 2006
  3. 3/3 annotate: --rev-file (-S) is not a boolean parameterRyan Anderson, Mar 2, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.