GNU bug report logs -
#52349
29.0.50; vc-git and diff-mode: stage hunks
Previous Next
Full log
Message #86 received at 52349 <at> debbugs.gnu.org (full text, mbox):
On 27.08.2022 23:07, Juri Linkov wrote:
>>> @@ -944,6 +944,8 @@ vc-git-checkin
>>> (let ((default-directory (file-name-directory file1)))
>>> (make-nearby-temp-file "git-msg")))))
>>> (when vc-git-patch-string
>>> + (unless (eq (vc-git-command nil t nil "diff" "--cached" "--quiet") 0)
>>> + (error "Index not empty"))
>>
>> user-error, maybe?
>
> Will be fixed.
>
>>> (let ((patch-file (make-temp-file "git-patch")))
>>> (with-temp-file patch-file
>>> (insert vc-git-patch-string))
>>
>> Looking great otherwise. Please install whenever you think it's ready.
>
> Not yet great :) I tried to fix another long-standing problem
> because its solution should also define the names of new functions here.
>
> The problem is that currently using 'C-c C-d' (log-edit-show-diff)
> in the *vc-log* buffer doesn't show the same diff that will be really
> committed when different files were marked in *vc-dir* parent buffer
> before typing 'C-c C-c' in *vc-log*.
>
> This is because currently log-edit-diff-function is set to vc-diff
> that is not suitable here since it tries to deduce fileset again
> from *vc-dir*, but files to commit are set in the buffer-local
> 'vc-log-fileset' in *vc-log*. So I added a new function
> 'log-edit-diff-fileset' that shows the diff from 'vc-log-fileset'.
> Using the same naming scheme, I renamed 'vc-diff-patch' to
> 'log-edit-diff-patch'.
>
> This shows the difference from the previous patch,
> but later these changes could be committed separately:
Makes perfect sense, thanks.
Honestly, I think it's a long-requested advanced feature which we'd be
happy to have even if there were rough edges remaining (as long as it
doesn't corrupt users' files or otherwise loses changes, of course). But
this seems to be coming along nicely.
This bug report was last modified 2 years and 194 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.