diff options
author | Dmitry Gutov <dgutov@yandex.ru> | 2015-05-16 17:11:33 +0300 |
---|---|---|
committer | Dmitry Gutov <dgutov@yandex.ru> | 2015-05-16 17:12:36 +0300 |
commit | becc0129ca5e32baa7135d9df8d118e66a30914b (patch) | |
tree | 7edb09c7bdeb2807cb8fac95ba03573437fb9400 /lisp/vc | |
parent | 30151ee56ba6f88d4ba8d36fb5c28c2940630965 (diff) | |
download | emacs-becc0129ca5e32baa7135d9df8d118e66a30914b.tar.gz |
Use `unless' to have one fewer `not'
* lisp/vc/vc-git.el (vc-git-resolve-when-done): Use `unless' to
have one fewer `not'.
Diffstat (limited to 'lisp/vc')
-rw-r--r-- | lisp/vc/vc-git.el | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index b08baba4e90..059f34eb446 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el @@ -810,14 +810,12 @@ This prompts for a branch to merge from." (goto-char (point-min)) (unless (re-search-forward "^<<<<<<< " nil t) (vc-git-command nil 0 buffer-file-name "add") - (when (and - (eq vc-git-resolve-conflicts 'unstage-maybe) - ;; Not doing a merge. Likely applying a stash - ;; (bug#20292). - (not - (file-exists-p (expand-file-name ".git/MERGE_HEAD" - (vc-git-root buffer-file-name)))) - (not (vc-git-conflicted-files (vc-git-root buffer-file-name)))) + (unless (or + (not (eq vc-git-resolve-conflicts 'unstage-maybe)) + ;; Doing a merge, so bug#20292 doesn't apply. + (file-exists-p (expand-file-name ".git/MERGE_HEAD" + (vc-git-root buffer-file-name))) + (vc-git-conflicted-files (vc-git-root buffer-file-name))) (vc-git-command nil 0 nil "reset")) ;; Remove the hook so that it is not called multiple times. (remove-hook 'after-save-hook 'vc-git-resolve-when-done t)))) |