]> code.delx.au - gnu-emacs/commitdiff
Abort when looking at stashed changes
authorDmitry Gutov <dgutov@yandex.ru>
Sun, 19 Apr 2015 16:28:17 +0000 (19:28 +0300)
committerDmitry Gutov <dgutov@yandex.ru>
Sun, 19 Apr 2015 16:28:17 +0000 (19:28 +0300)
* lisp/vc/vc-git.el (vc-git-find-file-hook): Abort when looking at
stashed changes (bug#20292).

lisp/vc/vc-git.el

index 48e22c826472205c29536f106c9020844b99586b..8f7015e0c5f5cb5454695f52cd03bc4f379a37cf 100644 (file)
@@ -800,7 +800,9 @@ This prompts for a branch to merge from."
              (vc-git-conflicted-files buffer-file-name)
              (save-excursion
                (goto-char (point-min))
-               (re-search-forward "^<<<<<<< " nil 'noerror)))
+               (and (re-search-forward "^>>>>>>> " nil 'noerror)
+                    ;; Stashes are tricky (bug#20292).
+                    (not (looking-at "Stashed changes")))))
     (vc-file-setprop buffer-file-name 'vc-state 'conflict)
     (smerge-start-session)
     (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local)