Subject: bug#1536: diff-mode for git patches problem

From: Dmitriy Blinov <[email-masked]>
Date: Thu, 11 Dec 2008 15:50:44 +0300

There is the problem then I'm trying to edit git-generated patches in 
emacs diff-mode.

git patches look like:
---
 hello.txt |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hello.txt b/hello.txt
index 55bf894..25a09cc 100644
--- a/hello.txt
+++ b/hello.txt
@@ -6,7 +6,7 @@
 5
 6
 7
-8
+8 8
 9
 10
 11
-- 
1.5.6.5

The last but one line is two minuses by default. And diff-mode 
recognizes  first minus as  deleted  string.
Therefore  when we change some strings in patch, emacs creates malformed 
hunk offset.
It will be @@ -6,8 +6,7 @@ insead of correct @@ -6,7 +6,7 @@ after patch 
edition (if we don't delete/create strings).