aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Gutov2014-03-08 08:56:22 +0200
committerDmitry Gutov2014-03-08 08:56:22 +0200
commitf0a4c8d764741c8e23bc4cd1ad47151586105f4c (patch)
tree87b3d0ac2a1022808ff1d61a3b3d5a345217972d
parentb646ea12bdcdb31abece8ecce8bfd2e4ea1a682a (diff)
downloademacs-f0a4c8d764741c8e23bc4cd1ad47151586105f4c.tar.gz
emacs-f0a4c8d764741c8e23bc4cd1ad47151586105f4c.zip
Fix #16897
* lisp/vc/vc-git.el (vc-git-command): Turn FILE-OR-LIST into nil when it only contains the repository root.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc/vc-git.el10
2 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index cc5c065c017..7bbc084319b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12014-03-08 Dmitry Gutov <dgutov@yandex.ru>
2
3 * vc/vc-git.el (vc-git-command): Turn FILE-OR-LIST into nil when
4 it only contains the repository root. (Bug#16897)
5
12014-03-07 Michael Albinus <michael.albinus@gmx.de> 62014-03-07 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * net/tramp-sh.el (tramp-sh-handle-vc-registered): Run first pass 8 * net/tramp-sh.el (tramp-sh-handle-vc-registered): Run first pass
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
index 06e46eeb663..c7cae8359bf 100644
--- a/lisp/vc/vc-git.el
+++ b/lisp/vc/vc-git.el
@@ -1210,7 +1210,15 @@ This command shares argument histories with \\[rgrep] and \\[grep]."
1210The difference to vc-do-command is that this function always invokes 1210The difference to vc-do-command is that this function always invokes
1211`vc-git-program'." 1211`vc-git-program'."
1212 (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program 1212 (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program
1213 file-or-list (cons "--no-pager" flags))) 1213 ;; http://debbugs.gnu.org/16897
1214 (unless (and (not (cdr-safe file-or-list))
1215 (let ((file (or (car-safe file-or-list)
1216 file-or-list)))
1217 (and file
1218 (eq ?/ (aref file (1- (length file))))
1219 (equal file (vc-git-root file)))))
1220 file-or-list)
1221 (cons "--no-pager" flags)))
1214 1222
1215(defun vc-git--empty-db-p () 1223(defun vc-git--empty-db-p ()
1216 "Check if the git db is empty (no commit done yet)." 1224 "Check if the git db is empty (no commit done yet)."