From: Eli Zaretskii <eliz@gnu.org>
To: schwab@linux-m68k.org
Cc: 21457@debbugs.gnu.org
Subject: bug#21457: 25.0.50; vc-test-git03-working-revision test fails
Date: Sat, 12 Sep 2015 18:36:41 +0300 [thread overview]
Message-ID: <83d1xnbqeu.fsf@gnu.org> (raw)
In-Reply-To: <83h9mzbrxx.fsf@gnu.org>
> Date: Sat, 12 Sep 2015 18:03:38 +0300
> From: Eli Zaretskii <eliz@gnu.org>
> Cc: 21457@debbugs.gnu.org
>
> > > diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el
> > > index 8a0f554..af2b39f 100644
> > > --- a/lisp/vc/vc-git.el
> > > +++ b/lisp/vc/vc-git.el
> > > @@ -1137,7 +1137,9 @@ (defun vc-git--rev-parse (rev)
> > > (with-temp-buffer
> > > (and
> > > (vc-git--out-ok "rev-parse" rev)
> > > - (buffer-substring-no-properties (point-min) (+ (point-min) 40)))))
> > > + (buffer-substring-no-properties (point-min)
> > > + (min (1- (point-max))
> > > + (+ (point-min) 40))))))
> >
> > Why does vc-git--out-ok return true when git rev-parse failed?
>
> Good question
Answer: that's my local 'git' script, if I invoke the Git binary
directly, the result is 128.
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".
What am I missing?
next prev parent reply other threads:[~2015-09-12 15:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 7:51 bug#21457: 25.0.50; vc-test-git03-working-revision test fails Eli Zaretskii
2015-09-11 20:30 ` Glenn Morris
2015-09-11 20:34 ` Glenn Morris
2015-09-12 9:02 ` Eli Zaretskii
2015-09-12 9:42 ` Andreas Schwab
2015-09-12 15:03 ` Eli Zaretskii
2015-09-12 15:36 ` Eli Zaretskii [this message]
2015-09-12 15:52 ` Eli Zaretskii
2015-09-12 16:54 ` Andreas Schwab
2015-09-12 17:10 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83d1xnbqeu.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=21457@debbugs.gnu.org \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.