[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#1537: diff-mode for git patches trouble
From: |
Dmitriy Blinov |
Subject: |
bug#1537: diff-mode for git patches trouble |
Date: |
Thu, 11 Dec 2008 16:08:59 +0300 |
User-agent: |
Mozilla-Thunderbird 2.0.0.17 (X11/20081018) |
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).
Is it possible to fix this harm or I should append whitespace before
"--" string always?
- bug#1537: diff-mode for git patches trouble,
Dmitriy Blinov <=