[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master b34578d 2/2: * lisp/vc: Fix use of find-conflicted-
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] master b34578d 2/2: * lisp/vc: Fix use of find-conflicted-file in Git. |
Date: |
Mon, 01 Dec 2014 18:17:01 +0000 |
branch: master
commit b34578dd880e788a68bb7bbd12fd848ba461226a
Author: Stefan Monnier <address@hidden>
Commit: Stefan Monnier <address@hidden>
* lisp/vc: Fix use of find-conflicted-file in Git.
* lisp/vc/vc.el (vc-find-conflicted-file): Look for conflicted files in the
current "project" rather than just the current directory.
* lisp/vc/vc-git.el (vc-git-conflicted-files): Clarify in which directory
the file names make sense.
---
lisp/ChangeLog | 5 +++++
lisp/vc/vc-git.el | 2 +-
lisp/vc/vc.el | 3 ++-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ec95af9..481bd15 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,10 @@
2014-12-01 Stefan Monnier <address@hidden>
+ * vc/vc.el (vc-find-conflicted-file): Look for conflicted files in the
+ current "project" rather than just the current directory.
+ * vc/vc-git.el (vc-git-conflicted-files): Clarify in which directory
+ the file names make sense.
+
* vc/smerge-mode.el (smerge-swap): New command.
* vc/diff-mode.el (diff-kill-applied-hunks): New command.
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 805e488..53db340 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -777,7 +777,7 @@ This prompts for a branch to merge from."
;; See git-status(1).
(when (member state '("AU" "UD" "UA" ;; "DD"
"DU" "AA" "UU"))
- (push file files)))))))
+ (push (expand-file-name file directory) files)))))))
(defun vc-git-resolve-when-done ()
"Call \"git add\" if the conflict markers have been removed."
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index b6ba2d3..d3315ca 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2101,8 +2101,9 @@ changes from the current branch."
(let* ((backend (or (if buffer-file-name (vc-backend buffer-file-name))
(vc-responsible-backend default-directory)
(error "No VC backend")))
+ (root (vc-root-dir))
(files (vc-call-backend backend
- 'conflicted-files default-directory)))
+ 'conflicted-files (or root
default-directory))))
;; Don't try and visit the current file.
(if (equal (car files) buffer-file-name) (pop files))
(if (null files)