GNU bug report logs - #42145
vc-git file order mismatch between vc-dir and vc-diff

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Tue, 30 Jun 2020 21:34:01 UTC

Severity: normal

Full log


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

From: Juri Linkov <juri <at> linkov.net>
To: Dmitry Gutov <dgutov <at> yandex.ru>
Cc: 42145 <at> debbugs.gnu.org
Subject: Re: bug#42145: vc-git file order mismatch between vc-dir and vc-diff
Date: Thu, 02 Jul 2020 00:44:04 +0300
>> There is an old usability problem in vc-dir.
>> Typing ‘=’ in a vc-dir buffer displays a vc-diff buffer where files are
>> sorted by different order than files are sorted in the vc-dir buffer.
>
> vc-dir has its own presentation logic, it's pretty complex.

The current sorting order in vc-dir is quite good,
so better not to change it.

> '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?

> Here's a bigger feature I've wanted to see in VC for a while: commit from
> a diff.
>
> There is a third-party package: https://github.com/caldwell/commit-patch
>
> But it implements some of its logic in Perl, and the message buffer it
> creates is non-standard. I'd really like to see it ported to VC.

Nice idea.

> 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".




This bug report was last modified 97 days ago.

Previous Next


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