From: Junio C Hamano <junkio@cox.net>
To: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: new file leaked onto release branch
Date: Wed, 14 Dec 2005 16:37:15 -0800 [thread overview]
Message-ID: <7v7ja7ures.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: Pine.LNX.4.63.0512150034120.8992@wbgn013.biozentrum.uni-wuerzburg.de
Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:
> So, it could have been
>
> git pull . 5165
>
> which mistakes 5165 for a short SHA1?
I do not think git-pull would work on arbitrary SHA1
expressions, so you should be safe.
Interestingly...
$ git rev-parse 5165
error: short SHA1 5165 is ambiguous.
5165
that short SHA1 is ambiguous. But a branch name immediately
under .git/refs/heads takes precedence:
$ git branch 5165 master
$ git rev-parse 5165 master
acd9b7b4e08a3f0f48afa922d8e371414cf2d3b2
acd9b7b4e08a3f0f48afa922d8e371414cf2d3b2
And this makes it safer and unambiguous:
$ git branch -d 5165
Deleted branch 5165.
$ git branch bug/5165 master
$ git rev-parse bug/5165
acd9b7b4e08a3f0f48afa922d8e371414cf2d3b2
We might want to detect collisions between SHA1 prefix and
branch names, but I am not sure if it is worth it in practice.
next prev parent reply other threads:[~2005-12-15 0:37 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-14 22:48 new file leaked onto release branch Brown, Len
2005-12-14 23:34 ` Johannes Schindelin
2005-12-15 0:37 ` Junio C Hamano [this message]
2005-12-15 1:29 ` Johannes Schindelin
-- strict thread matches above, loose matches on Subject: below --
2005-12-19 3:21 Brown, Len
2005-12-19 9:16 ` Junio C Hamano
2005-12-14 22:06 Brown, Len
2005-12-14 22:16 ` Junio C Hamano
2005-12-14 21:51 Brown, Len
2005-12-14 21:31 Brown, Len
2005-12-14 19:20 Brown, Len
2005-12-14 20:10 ` Linus Torvalds
2005-12-18 7:08 ` Junio C Hamano
2005-12-14 20:45 ` Junio C Hamano
2005-12-14 21:26 ` Tom Prince
2005-12-14 18:27 Brown, Len
2005-12-14 9:58 Brown, Len
2005-12-14 9:41 Brown, Len
2005-12-14 7:57 Len Brown
2005-12-14 8:37 ` Junio C Hamano
2005-12-14 9:39 ` Junio C Hamano
2005-12-14 16:26 ` Linus Torvalds
2005-12-14 16:53 ` Linus Torvalds
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=7v7ja7ures.fsf@assigned-by-dhcp.cox.net \
--to=junkio@cox.net \
--cc=Johannes.Schindelin@gmx.de \
--cc=git@vger.kernel.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).