diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2015-04-19 19:28:17 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2015-04-19 19:28:17 +0300 |
commit | d35f2f482273a822df695202f4a3bf1a5e473e63 (patch) | |
tree | 4400b2ff85141795aa3f8fa1bafcef47e8e1654c | |
parent | 96bfe816d8107003dba7fd824c2ac2b999a84ae9 (diff) | |
download | emacs-d35f2f482273a822df695202f4a3bf1a5e473e63.tar.gz |
Abort when looking at stashed changes
* lisp/vc/vc-git.el (vc-git-find-file-hook): Abort when looking at
stashed changes (bug#20292).
-rw-r--r-- | lisp/vc/vc-git.el | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 48e22c82647..8f7015e0c5f 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -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) |