help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reviewing git patches with the source file without applying the patc


From: James Thomas
Subject: Re: Reviewing git patches with the source file without applying the patch
Date: Fri, 08 Dec 2023 19:16:22 +0530
User-agent: Gnus/5.13 (Gnus v5.13)

husain@alshehhi.io wrote:

> Hello,
>
> I often receive patches (files generated by 'git format-path'
> command). I review these files in diff-mode. This is in most cases is
> enough. But sometimes, I want to see the source code before and after
> the change so that I can see the full context. I am not sure how to do
> this in emacs.
>
> diff-mode provides C-c C-c (which is diff-goto-source). This is great
> improvement, but it shows the source file only, not the changes before
> and after. I have to compute in my head the patch against the source
> file to undrestand the change. Additionally, diff-goto-source requires
> the path to the source file. I wish it would take the dir instead and it
> can compute the source file on its own.
>
> diff-mode also provides C-c C-e (which is diff-ediff-patch). This view
> is what I am looking for: it provides a view when I can see the source
> file before and after the change. However, diff-ediff-patch applies the
> change automatically, which is not what I want to do. Additionally,
> diff-ediff-patch generates .orig files which are also unwant.
>
> Any help is appreciated.

There's ediff-patch-buffer. You can also try diffing the buffer with the
file after applying the patch in diff mode, for eg, with
ediff-current-file. More: (info "(ediff) Major Entry Points")

--



reply via email to

[Prev in Thread] Current Thread [Next in Thread]