aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2008-02-16 18:16:55 +0000
committerJuanma Barranquero2008-02-16 18:16:55 +0000
commit6b99fa736f1b3e2b66cad76ba4ce8408969d8814 (patch)
treed3a7e2cabde49a80d83f31573cd98d8c7c239903
parent0a0d3143b801fc6b723020a1a12e569b56982e75 (diff)
downloademacs-6b99fa736f1b3e2b66cad76ba4ce8408969d8814.tar.gz
emacs-6b99fa736f1b3e2b66cad76ba4ce8408969d8814.zip
(vc-find-root): Don't loop forever on non-existent root.
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/vc-hooks.el2
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index a92d8d16c73..ccf112e0da6 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
12008-02-16 Eli Zaretskii <eliz@gnu.org>
2
3 * vc-hooks.el (vc-find-root): Don't loop forever on non-existent root.
4
12008-02-14 Stefan Monnier <monnier@pastel.home> 52008-02-14 Stefan Monnier <monnier@pastel.home>
2 6
3 * textmodes/sgml-mode.el (sgml-mode): Fix comment syntax. 7 * textmodes/sgml-mode.el (sgml-mode): Fix comment syntax.
diff --git a/lisp/vc-hooks.el b/lisp/vc-hooks.el
index 64a7d8f527a..38ad7b5ea83 100644
--- a/lisp/vc-hooks.el
+++ b/lisp/vc-hooks.el
@@ -316,7 +316,7 @@ The function walks up the directory tree from FILE looking for WITNESS.
316If WITNESS if not found, return nil, otherwise return the root." 316If WITNESS if not found, return nil, otherwise return the root."
317 ;; Represent /home/luser/foo as ~/foo so that we don't try to look for 317 ;; Represent /home/luser/foo as ~/foo so that we don't try to look for
318 ;; witnesses in /home or in /. 318 ;; witnesses in /home or in /.
319 (while (not (file-directory-p file)) 319 (while (and (not (file-directory-p file)) (file-exists-p file))
320 (setq file (file-name-directory (directory-file-name file)))) 320 (setq file (file-name-directory (directory-file-name file))))
321 (setq file (abbreviate-file-name file)) 321 (setq file (abbreviate-file-name file))
322 (let ((root nil) 322 (let ((root nil)