emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r116702: Fix #16897


From: Dmitry Gutov
Subject: [Emacs-diffs] trunk r116702: Fix #16897
Date: Sat, 08 Mar 2014 06:57:21 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116702
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/16897
committer: Dmitry Gutov <address@hidden>
branch nick: trunk
timestamp: Sat 2014-03-08 08:56:22 +0200
message:
  Fix #16897
  
  * lisp/vc/vc-git.el (vc-git-command): Turn FILE-OR-LIST into nil when
  it only contains the repository root.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/vc/vc-git.el              vcgit.el-20091113204419-o5vbwnq5f7feedwu-5070
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-03-07 14:07:12 +0000
+++ b/lisp/ChangeLog    2014-03-08 06:56:22 +0000
@@ -1,3 +1,8 @@
+2014-03-08  Dmitry Gutov  <address@hidden>
+
+       * vc/vc-git.el (vc-git-command): Turn FILE-OR-LIST into nil when
+       it only contains the repository root.  (Bug#16897)
+
 2014-03-07  Michael Albinus  <address@hidden>
 
        * net/tramp-sh.el (tramp-sh-handle-vc-registered): Run first pass

=== modified file 'lisp/vc/vc-git.el'
--- a/lisp/vc/vc-git.el 2014-01-22 02:01:40 +0000
+++ b/lisp/vc/vc-git.el 2014-03-08 06:56:22 +0000
@@ -1210,7 +1210,15 @@
 The difference to vc-do-command is that this function always invokes
 `vc-git-program'."
   (apply 'vc-do-command (or buffer "*vc*") okstatus vc-git-program
-         file-or-list (cons "--no-pager" flags)))
+         ;; http://debbugs.gnu.org/16897
+         (unless (and (not (cdr-safe file-or-list))
+                      (let ((file (or (car-safe file-or-list)
+                                      file-or-list)))
+                        (and file
+                             (eq ?/ (aref file (1- (length file))))
+                             (equal file (vc-git-root file)))))
+           file-or-list)
+         (cons "--no-pager" flags)))
 
 (defun vc-git--empty-db-p ()
   "Check if the git db is empty (no commit done yet)."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]