GNU bug report logs -
#20292
24.5; Saving Git-controlled file with merge conflicts after "stash pop" stages the file
Previous Next
Reported by: Eli Zaretskii <eliz <at> gnu.org>
Date: Fri, 10 Apr 2015 12:57:02 UTC
Severity: normal
Merged with 20151
Found in versions 24.5, 25.0.50
Done: Dmitry Gutov <dgutov <at> yandex.ru>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
On 04/10/2015 03:55 PM, Eli Zaretskii wrote:
> If "git stash pop" encounters merge conflicts, then resolving these
> conflicts in Emacs and saving the buffer will run "git add" for the
> file whose conflicts were resolved. But that is not TRT in this case;
> the user likely does not expect to have her uncommitted changes staged
> for the next commit.
Apparently, to both mark the conflict as resolved and not stage the
file, the best we can do is 'git add ...; git reset ...', which would
not DTRT if the file had some changes, and they were staged before you
did 'git stash pop' (if the file had unstaged changes, 'git stash pop'
would abort).
Should we be concerned about that?
> Therefore, I think vc-git-resolve-when-done should not run "git add"
> if the merge conflict was due to "git stash pop".
Maybe we can detect this case (as well as any similar ones) by the
absence of .git/MERGE_HEAD.
But what's the justification for vc-git-resolve-when-done?
I think vc-git-checkin will work well enough without that.
Further, if there's a conflict, 'git stash pop' doesn't actually remove
the stash from the list. Would we expect vc-git-resolve-when-done to
call 'git stash drop' at the end of conflict resolution?
This bug report was last modified 8 years and 191 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.