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.