From: Emeric Fermas <emeric.fermas@gmail.com>
To: git@vger.kernel.org
Cc: Vicent Marti <tanoku@gmail.com>, libgit2@librelist.com
Subject: What's the definition of a valid Git symbolic reference?
Date: Mon, 14 Feb 2011 21:58:14 +0100 [thread overview]
Message-ID: <AANLkTinsJkzYggMtNrLRv-qNxRncrXSe6A46Z=d8xkw7@mail.gmail.com> (raw)
Hello,
I'm one of the contributors of libgit2 (http://libgit2.github.com/).
I'm currently working on the handling of refs and I'd like to get a
better understanding of git symbolic references.
In order to avoid polluting this list with an easy to answer noob
question, I firsty asked this question on stackoverflow
(http://stackoverflow.com/q/4986000). However, I do not have the
feeling that I'm getting some definite "carved-in-stone" answers.
This explains why I'm posting it here today.
The following shell code correctly creates a chain of symbolic references
git symbolic-ref "first" "refs/heads/master"
git symbolic-ref "second" "first"
git symbolic-ref "nested/third" "second"
git symbolic-ref "refs/heads/fourth" "nested/third"
And the following shell code correctly resolves the latest created
symbolic reference to the tip of master.
git show-ref "refs/heads/fourth"
None of these use cases are described in the official documentation
(git-symbolic-ref doc, git-show-ref doc).
However, the following doesn't work
git check-ref-format --print "first"
So, my questions are:
- Is it ok to store a symbolic reference within the refs/heads directory ?
- Is it ok to chain symbolic references ?
- As check-ref-format fails when being passed "first", does this mean
that it's not recommended to create a symbolic reference at the same
level than "HEAD"? Or maybe this command is not intended to deal with
symbolic links ?
My intent is to get a clear understanding of what is being supported
and that I'm not working around anything or benefiting from a bug.
Thanks in advance for any help you could provide me with.
Cheers,
Em.
Em.
next reply other threads:[~2011-02-14 20:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-14 20:58 Emeric Fermas [this message]
2011-02-15 3:19 ` What's the definition of a valid Git symbolic reference? Kevin Ballard
2011-02-15 3:49 ` Emeric Fermas
2011-02-15 5:02 ` Tomas Carnecky
2011-02-19 13:10 ` Kevin P. Fleming
2011-02-15 6:22 ` Junio C Hamano
2011-02-15 6:32 ` Emeric Fermas
2011-02-15 7:09 ` Jeff King
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='AANLkTinsJkzYggMtNrLRv-qNxRncrXSe6A46Z=d8xkw7@mail.gmail.com' \
--to=emeric.fermas@gmail.com \
--cc=git@vger.kernel.org \
--cc=libgit2@librelist.com \
--cc=tanoku@gmail.com \
/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).