unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dmitry Gutov <dgutov@yandex.ru>
To: Juri Linkov <juri@linkov.net>
Cc: 42145@debbugs.gnu.org
Subject: bug#42145: vc-git file order mismatch between vc-dir and vc-diff
Date: Thu, 2 Jul 2020 01:44:15 +0300	[thread overview]
Message-ID: <82542bee-ec10-86b6-39bb-8d4fa0c68770@yandex.ru> (raw)
In-Reply-To: <871rluewrf.fsf@mail.linkov.net>

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	other threads:[~2020-07-01 22:44 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-30 20:57 bug#42145: vc-git file order mismatch between vc-dir and vc-diff Juri Linkov
2020-06-30 22:08 ` Dmitry Gutov
2020-07-01 21:44   ` Juri Linkov
2020-07-01 22:44     ` Dmitry Gutov [this message]
2021-03-30 19:23   ` Juri Linkov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=82542bee-ec10-86b6-39bb-8d4fa0c68770@yandex.ru \
    --to=dgutov@yandex.ru \
    --cc=42145@debbugs.gnu.org \
    --cc=juri@linkov.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).