changeset 94290:55b13d307a7a

(vc-git-status-printer): Deal with directories.
author Dan Nicolaescu <dann@ics.uci.edu>
date Wed, 23 Apr 2008 04:07:11 +0000
parents 82466e0389bb
children 171ae2941bb8
files lisp/ChangeLog lisp/vc-git.el
diffstat 2 files changed, 10 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Wed Apr 23 04:05:26 2008 +0000
+++ b/lisp/ChangeLog	Wed Apr 23 04:07:11 2008 +0000
@@ -1,5 +1,7 @@
 2008-04-23  Dan Nicolaescu  <dann@ics.uci.edu>
 
+	* vc-git.el (vc-git-status-printer): Deal with directories.
+
 	* vc.el (vc-next-action): Look at more than the first file to
 	determine the state.
 
--- a/lisp/vc-git.el	Wed Apr 23 04:05:26 2008 +0000
+++ b/lisp/vc-git.el	Wed Apr 23 04:07:11 2008 +0000
@@ -87,7 +87,7 @@
 ;; - comment-history (file)			   ??
 ;; - update-changelog (files)			   COULD BE SUPPORTED
 ;; * diff (file &optional rev1 rev2 buffer)	   OK
-;; - revision-completion-table (files)		   NEEDED?
+;; - revision-completion-table (files)		   OK
 ;; - annotate-command (file buf &optional rev)	   OK
 ;; - annotate-time ()				   OK
 ;; - annotate-current-time ()			   NOT NEEDED
@@ -108,7 +108,10 @@
 ;; - find-file-hook ()				   NOT NEEDED
 ;; - find-file-not-found-hook ()                   NOT NEEDED
 
-(eval-when-compile (require 'cl) (require 'vc) (require 'grep))
+(eval-when-compile
+  (require 'cl)
+  (require 'vc)
+  (require 'grep))
 
 (defvar git-commits-coding-system 'utf-8
   "Default coding system for git commits.")
@@ -287,7 +290,9 @@
 
 (defun vc-git-status-printer (info)
   "Pretty-printer for the vc-dir-fileinfo structure."
-  (let* ((state (vc-dir-fileinfo->state info))
+  (let* ((state (if (vc-dir-fileinfo->directory info)
+		    'DIRECTORY
+		  (vc-dir-fileinfo->state info)))
          (extra (vc-dir-fileinfo->extra info))
          (old-perm (when extra (vc-git-extra-fileinfo->old-perm extra)))
          (new-perm (when extra (vc-git-extra-fileinfo->new-perm extra))))