GNU bug report logs - #1536
diff-mode for git patches problem

Previous Next

Package: emacs;

Reported by: Dmitriy Blinov <bda <at> mns.spb.ru>

Date: Thu, 11 Dec 2008 13:00:02 UTC

Severity: wishlist

Merged with 1537

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 1536 in the body.
You can then email your comments to 1536 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#1536; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to Dmitriy Blinov <bda <at> mns.spb.ru>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Dmitriy Blinov <bda <at> mns.spb.ru>
To: bug-gnu-emacs <at> gnu.org
Subject: diff-mode for git patches problem
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).





Merged 1536 1537. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> emacsbugs.donarmstrong.com. (Thu, 11 Dec 2008 18:05:07 GMT) Full text and rfc822 format available.

Severity set to `wishlist' from `normal' Request was from Stefan Monnier <monnier <at> IRO.UMontreal.CA> to control <at> emacsbugs.donarmstrong.com. (Fri, 12 Dec 2008 19:15:04 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#1536; Package emacs. (Sun, 16 Aug 2020 17:01:01 GMT) Full text and rfc822 format available.

Message #12 received at 1536 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: Dmitriy Blinov <bda <at> mns.spb.ru>
Cc: 1537 <at> debbugs.gnu.org, 1536 <at> debbugs.gnu.org
Subject: Re: bug#1537: diff-mode for git patches trouble
Date: Sun, 16 Aug 2020 10:00:02 -0700
Dmitriy Blinov <bda <at> mns.spb.ru> writes:

> 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

(That was 11 years ago.)

I can't reproduce this on current master.  The numbers seem to update
correctly, as ar as I'm understanding from:

    https://stackoverflow.com/questions/6508651/what-do-the-numbers-on-a-git-diff-header-mean

It would be useful if someone could double check this finding in case
there is something I'm missing.  It could be quickly verified using:

    git format-patch -1 ; ./src/emacs -Q *patch

And then edit any line in a patch to see if the numbers update correctly.

Best regards,
Stefan Kangas




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#1536; Package emacs. (Wed, 14 Oct 2020 06:09:01 GMT) Full text and rfc822 format available.

Message #15 received at 1536 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 1537 <at> debbugs.gnu.org, 1536 <at> debbugs.gnu.org, Dmitriy Blinov <bda <at> mns.spb.ru>
Subject: Re: bug#1536: bug#1537: diff-mode for git patches trouble
Date: Wed, 14 Oct 2020 08:08:17 +0200
Stefan Kangas <stefan <at> marxist.se> writes:

> I can't reproduce this on current master.  The numbers seem to update
> correctly, as ar as I'm understanding from:
>
>     https://stackoverflow.com/questions/6508651/what-do-the-numbers-on-a-git-diff-header-mean
>
> It would be useful if someone could double check this finding in case
> there is something I'm missing.  It could be quickly verified using:
>
>     git format-patch -1 ; ./src/emacs -Q *patch
>
> And then edit any line in a patch to see if the numbers update correctly.

Yup; seems to update correctly for me, too, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




bug closed, send any further explanations to 1536 <at> debbugs.gnu.org and Dmitriy Blinov <bda <at> mns.spb.ru> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Wed, 14 Oct 2020 06:09:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 11 Nov 2020 12:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 164 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.