From: Junio C Hamano Date: Fri, 22 Dec 2006 00:52:50 GMT Subject: Re: [PATCH] fix vc git Message-ID: <7vhcvo92fx.fsf@assigned-by-dhcp.cox.net> In-Reply-To: <8e745ecf0612210359j3f895521r1fff497a512253d3@mail.gmail.com> "Duncan Mak" writes: > --- a/contrib/emacs/vc-git.el > +++ b/contrib/emacs/vc-git.el > @@ -58,7 +58,7 @@ > (with-temp-buffer > (let* ((dir (file-name-directory file)) > (name (file-relative-name file dir))) > - (when dir (cd dir)) > + (when (file-exists-p dir) (cd dir)) > (and (ignore-errors (eq 0 (call-process "git" nil '(t nil) nil > "ls-files" "-c" "-z" "--" name))) > (let ((str (buffer-string))) > (and (> (length str) (length name)) I wonder what would happen when (file-name-directory file) returns nil with this change...