From: Thomas Rast <trast@inf•ethz.ch>
To: "Nguyễn Thái Ngọc Duy" <pclouds@gmail•com>
Cc: <git@vger•kernel.org>
Subject: Re: [PATCH/RFC] get_sha1: prefer 40-hex ref name over 40-hex SHA-1
Date: Thu, 2 May 2013 10:55:39 +0200 [thread overview]
Message-ID: <87r4hpu5f8.fsf@linux-k42r.v.cablecom.net> (raw)
In-Reply-To: <1367377282-9862-1-git-send-email-pclouds@gmail.com> ("Nguyễn Thái Ngọc Duy"'s message of "Wed, 1 May 2013 10:01:22 +0700")
Nguyễn Thái Ngọc Duy <pclouds@gmail•com> writes:
> +test_expect_success 'rev-parse 20-hex ref' '
> + REF=`git rev-parse HEAD` &&
> + VAL=`echo| git commit-tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904` &&
> + git update-ref refs/heads/$REF $VAL &&
> + test `git rev-parse $REF` = $VAL
> +'
> +
> +test_expect_success 'rev-parse ambiguous 20-hex ref' '
> + REF=`git rev-parse HEAD` &&
> + VAL=`echo| git commit-tree -p HEAD 4b825dc642cb6eb9a060e54bf8d69288fbee4904` &&
> + git update-ref refs/tags/$REF $VAL &&
> + test `git rev-parse $REF 2>err` = $VAL &&
> + grep "refname.*ambiguous" err
> +'
Shouldn't these say s/20-hex/40-hex/?
--
Thomas Rast
trast@{inf,student}.ethz.ch
prev parent reply other threads:[~2013-05-02 8:55 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-01 3:01 [PATCH/RFC] get_sha1: prefer 40-hex ref name over 40-hex SHA-1 Nguyễn Thái Ngọc Duy
2013-05-01 3:03 ` Eric Sunshine
2013-05-01 18:43 ` Jonathan Nieder
2013-05-02 10:09 ` Duy Nguyen
2013-05-04 3:45 ` [PATCH] get_sha1: improve ambiguity warning regarding SHA-1 and ref names Nguyễn Thái Ngọc Duy
2013-05-07 16:09 ` Junio C Hamano
2013-05-29 12:12 ` [PATCH v2] get_sha1: warn about full or short object names that look like refs Nguyễn Thái Ngọc Duy
2013-05-02 8:55 ` Thomas Rast [this message]
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=87r4hpu5f8.fsf@linux-k42r.v.cablecom.net \
--to=trast@inf$(echo .)ethz.ch \
--cc=git@vger$(echo .)kernel.org \
--cc=pclouds@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox