Subject: 24.5; Saving Git-controlled file with merge conflicts after "stash pop" stages the file

From: Eli Zaretskii <[email-masked]>
Date: Fri, 10 Apr 2015 15:55:44 +0300

>From the shell prompt type "git stash save" to stash uncommitted
changes.  Then "git pull" or "git merge" from upstream, and finally
type "git stash pop" to restore your original changes.

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.

Therefore, I think vc-git-resolve-when-done should not run "git add"
if the merge conflict was due to "git stash pop".

In GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-03-27 on HOME-C4E4A596F7
Windowing system distributor `Microsoft Corp.', version 5.1.2600
Configured using:
 `configure --prefix=/d/usr 'CFLAGS=-Og -gdwarf-4 -g3''

Important settings:
  value of $LANG: ENU
  locale-coding-system: cp1255

Major mode: RMAIL

Minor modes in effect:
  diff-auto-refine-mode: t
  desktop-save-mode: t
  show-paren-mode: t
  display-time-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  temp-buffer-resize-mode: t
  buffer-read-only: t
  line-number-mode: t

Recent messages:
Getting mail from d:/usr/eli/data/mail.new...
Counting new messages...done (12)
Saving file d:/usr/eli/rmail/INBOX...
Wrote d:/usr/eli/rmail/INBOX [2 times]
Computing summary lines...done
12 new messages read
Mark set
No following nondeleted message
Saving file d:/usr/eli/rmail/INBOX...
Wrote d:/usr/eli/rmail/INBOX [2 times]

Load-path shadows:
d:/usr/share/emacs/site-lisp/soap-inspect hides d:/usr/share/emacs/24.5/lisp/net/soap-inspect
d:/usr/share/emacs/site-lisp/soap-client hides d:/usr/share/emacs/24.5/lisp/net/soap-client

Features:
(shadow emacsbug etags smerge-mode cc-awk bug-reference add-log
misearch multi-isearch dabbrev shr-color color mule-util rmailout shr
browse-url network-stream starttls tls mail-extr smtpmail auth-source
eieio byte-opt bytecomp byte-compile cconv eieio-core password-cache
mailalias sendmail help-mode cl-extra texinfo ld-script tcl conf-mode
org-element org-rmail org-mhe org-irc org-info org-gnus gnus-util
org-docview doc-view image-mode dired-x dired org-bibtex bibtex
org-bbdb org-w3m org advice org-macro org-footnote org-pcomplete
pcomplete org-list org-faces org-entities org-version ob-emacs-lisp ob
ob-tangle ob-ref ob-lob ob-table ob-exp org-src ob-keys ob-comint
comint ansi-color ring ob-core ob-eval org-compat org-macs
org-loaddefs find-func cal-menu calendar cal-loaddefs arc-mode
archive-mode parse-time diff-mode vc-bzr sh-script smie executable
generic make-mode noutline outline easy-mmode vc-cvs jka-compr
bat-mode vc-dispatcher vc-svn flyspell info vc-git cc-langs rmailsum
qp rmailmm message format-spec rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mailabbrev gmm-utils mailheader mail-parse rfc2231 rmail
rfc2047 rfc2045 ietf-drums mm-util help-fns mail-prsvr mail-utils
desktop frameset server filecache mairix cus-edit cus-start cus-load
wid-edit cl-loaddefs cl-lib saveplace midnight ispell generic-x
cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align
cc-engine cc-vars cc-defs paren battery time time-date tooltip
electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32
ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd
fontset image regexp-opt fringe tabulated-list newcomment lisp-mode
prog-mode register page menu-bar rfn-eshadow timer select scroll-bar
mouse jit-lock font-lock syntax facemenu font-core frame cham georgian
utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean
japanese hebrew greek romanian slovak czech european ethiopic indian
cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev
minibuffer nadvice loaddefs button faces cus-face macroexp files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
w32notify w32 multi-tty emacs)

Memory information:
((conses 8 1513834 148516)
 (symbols 32 42131 0)
 (miscs 32 5809 4393)
 (strings 16 105774 18210)
 (string-bytes 1 3133483)
 (vectors 8 37368)
 (vector-slots 4 1563878 83782)
 (floats 8 326 1158)
 (intervals 28 269674 1601)
 (buffers 508 358))