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

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

bug#42145: vc-git file order mismatch between vc-dir and vc-diff


From: Dmitry Gutov
Subject: bug#42145: vc-git file order mismatch between vc-dir and vc-diff
Date: Thu, 2 Jul 2020 01:44:15 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0

On 02.07.2020 00:44, Juri Linkov wrote:
>> 'git diff' has a '-O' argument, which accepts <orderfile>. Maybe
>> it'll help, but I kind of doubt that. Ideas welcome.

> Maybe it's possible to write a diff-mode function to sort file hunks
> in
> vc-diff output buffer?  Maybe by just giving the right file-beginning
> regexp to sort-subr?

Which sort-subr?

Overall, it sounds possible. But I would be careful about making the display of long diffs slower.

The idea is, you open a diff, maybe split some of the hunks, kill the ones
you don't need (diff-mode supports all these operations), and then commit
the remaining ones, from multiple files, if needed. Seems like a good
replacement for 'git add -p' for Emacs power users.
But I wonder how it could handle binary files where git-diff output says just
"Binary files differ".

Perhaps it wouldn't.

Or perhaps it would check them in wholesale, without choosing individual pieces inside.





reply via email to

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