[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21457: 25.0.50; vc-test-git03-working-revision test fails
From: |
Eli Zaretskii |
Subject: |
bug#21457: 25.0.50; vc-test-git03-working-revision test fails |
Date: |
Sat, 12 Sep 2015 18:52:00 +0300 |
> Date: Sat, 12 Sep 2015 18:36:41 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 21457@debbugs.gnu.org
>
> But I still don't understand how this
>
> ;; Create empty repository. Check working revision of
> ;; repository, should be nil.
> (make-directory default-directory)
> (vc-test--create-repo-function backend)
>
> ;; nil: CVS Mtn RCS SCCS
> ;; "0": Bzr Hg SRC SVN
> ;; "master" or "HEAD": Git
> (should (eq (vc-working-revision default-directory)
> (vc-working-revision default-directory backend)))
>
> was supposed to work, since "git rev-parse HEAD" fails in an empty
> repository and returns just "HEAD", not a 40-digit hash or "master".
Ah, okay, I get it: vc-working-revision was supposed to fail and
return nil in both cases. Which makes this test not a very useful
one. But then how was this supposed to work?
;; Register a file. Check working revision.
(vc-register
(list backend (list (file-name-nondirectory tmp-name))))
;; nil: Mtn RCS SCCS
;; "0": Bzr CVS Hg SRC SVN
;; "master" or "HEAD": Git
(should (eq (vc-working-revision tmp-name)
(vc-working-revision tmp-name backend)))
(should
(member (vc-working-revision tmp-name) '(nil "0" "master")))