1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(vc-arch-workfile-version): Handle the empty-branch case.

This commit is contained in:
Stefan Monnier 2005-01-02 22:00:07 +00:00
parent 50292b6e31
commit 5e39b98a29
2 changed files with 5 additions and 4 deletions

View file

@ -1,6 +1,6 @@
;;; vc-arch.el --- VC backend for the Arch version-control system
;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004
;; Copyright (C) 1995, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
;; Free Software Foundation, Inc.
;; Author: FSF (see vc.el for full credits)
@ -270,7 +270,7 @@ Return non-nil if FILE is unchanged."
(defun vc-arch-workfile-version (file)
(let* ((root (expand-file-name "{arch}" (vc-arch-root file)))
(defbranch (vc-arch-default-version file)))
(when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*\\)--.*\\)--.*\\)\\'" defbranch))
(when (and defbranch (string-match "\\`\\(.+@[^/\n]+\\)/\\(\\(\\(.*\\)\\(--.*\\)?\\)--.*\\)\\'" defbranch))
(let* ((archive (match-string 1 defbranch))
(category (match-string 4 defbranch))
(branch (match-string 3 defbranch))