unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#1537: diff-mode for git patches trouble
@ 2008-12-11 13:08 Dmitriy Blinov
  2008-12-11 19:04 ` Stefan Monnier
  2020-08-16 17:00 ` bug#1536: " Stefan Kangas
  0 siblings, 2 replies; 7+ messages in thread
From: Dmitriy Blinov @ 2008-12-11 13:08 UTC (permalink / raw)
  To: bug-gnu-emacs

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?







^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-10-14  6:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-11 13:08 bug#1537: diff-mode for git patches trouble Dmitriy Blinov
2008-12-11 19:04 ` Stefan Monnier
2008-12-12  6:57   ` Dmitriy Blinov
2008-12-12 19:08     ` Stefan Monnier
2008-12-12 19:15       ` Processed: " Emacs bug Tracking System
2020-08-16 17:00 ` bug#1536: " Stefan Kangas
2020-10-14  6:08   ` bug#1537: " Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).