aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2015-05-16 17:11:33 +0300
committerDmitry Gutov2015-05-16 17:12:36 +0300
commitbecc0129ca5e32baa7135d9df8d118e66a30914b (patch)
tree7edb09c7bdeb2807cb8fac95ba03573437fb9400
parent30151ee56ba6f88d4ba8d36fb5c28c2940630965 (diff)
downloademacs-becc0129ca5e32baa7135d9df8d118e66a30914b.tar.gz
emacs-becc0129ca5e32baa7135d9df8d118e66a30914b.zip
Use `unless' to have one fewer `not'
* lisp/vc/vc-git.el (vc-git-resolve-when-done): Use `unless' to have one fewer `not'.
-rw-r--r--lisp/vc/vc-git.el14
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."
810 (goto-char (point-min)) 810 (goto-char (point-min))
811 (unless (re-search-forward "^<<<<<<< " nil t) 811 (unless (re-search-forward "^<<<<<<< " nil t)
812 (vc-git-command nil 0 buffer-file-name "add") 812 (vc-git-command nil 0 buffer-file-name "add")
813 (when (and 813 (unless (or
814 (eq vc-git-resolve-conflicts 'unstage-maybe) 814 (not (eq vc-git-resolve-conflicts 'unstage-maybe))
815 ;; Not doing a merge. Likely applying a stash 815 ;; Doing a merge, so bug#20292 doesn't apply.
816 ;; (bug#20292). 816 (file-exists-p (expand-file-name ".git/MERGE_HEAD"
817 (not 817 (vc-git-root buffer-file-name)))
818 (file-exists-p (expand-file-name ".git/MERGE_HEAD" 818 (vc-git-conflicted-files (vc-git-root buffer-file-name)))
819 (vc-git-root buffer-file-name))))
820 (not (vc-git-conflicted-files (vc-git-root buffer-file-name))))
821 (vc-git-command nil 0 nil "reset")) 819 (vc-git-command nil 0 nil "reset"))
822 ;; Remove the hook so that it is not called multiple times. 820 ;; Remove the hook so that it is not called multiple times.
823 (remove-hook 'after-save-hook 'vc-git-resolve-when-done t)))) 821 (remove-hook 'after-save-hook 'vc-git-resolve-when-done t))))