diff options
| author | Dmitry Gutov | 2015-04-19 19:28:17 +0300 |
|---|---|---|
| committer | Dmitry Gutov | 2015-04-19 19:28:17 +0300 |
| commit | d35f2f482273a822df695202f4a3bf1a5e473e63 (patch) | |
| tree | 4400b2ff85141795aa3f8fa1bafcef47e8e1654c | |
| parent | 96bfe816d8107003dba7fd824c2ac2b999a84ae9 (diff) | |
| download | emacs-d35f2f482273a822df695202f4a3bf1a5e473e63.tar.gz emacs-d35f2f482273a822df695202f4a3bf1a5e473e63.zip | |
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." | |||
| 800 | (vc-git-conflicted-files buffer-file-name) | 800 | (vc-git-conflicted-files buffer-file-name) |
| 801 | (save-excursion | 801 | (save-excursion |
| 802 | (goto-char (point-min)) | 802 | (goto-char (point-min)) |
| 803 | (re-search-forward "^<<<<<<< " nil 'noerror))) | 803 | (and (re-search-forward "^>>>>>>> " nil 'noerror) |
| 804 | ;; Stashes are tricky (bug#20292). | ||
| 805 | (not (looking-at "Stashed changes"))))) | ||
| 804 | (vc-file-setprop buffer-file-name 'vc-state 'conflict) | 806 | (vc-file-setprop buffer-file-name 'vc-state 'conflict) |
| 805 | (smerge-start-session) | 807 | (smerge-start-session) |
| 806 | (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local) | 808 | (add-hook 'after-save-hook 'vc-git-resolve-when-done nil 'local) |