Re: How does 'git notes --ref' work?
- From
Johan Herland <johan@herland.net>
- Date
- Jan 14, 2011, 10:49 UTC
- Message-ID
- <201101141149.38778.johan@herland.net>
- In-Reply-To
- <AANLkTimL137aFt2dyvdHxTMUjB4diwJQG-FQiYEK8tVJ@mail.gmail.com>
On Friday 14 January 2011, Edwin Kempin wrote:
Show 8 quoted lines
> How does 'git notes --ref' work? If I try > 'git notes --ref refs/meta/reject-commits add -m "reject" HEAD' > then the note is added to 'refs/notes/refs/meta/reject-commits' and > not as expected to 'refs/meta/reject-commits'. > > The description of the --ref option says [1]: > "The ref is taken to be in refs/notes/ if it is not qualified." > What is a qualified ref?
A qualified ref (in this context) is one that starts with refs/notes. If it doesn't start with refs/notes, then refs/notes is prepended to it.
This is a restriction we put in place to make sure the notes infrastructure didn't edit (i.e. damage) any refs outside the refs/notes/ namespace.
We will probably remove this restriction in a future Git version. Until then, please keep your notes within the refs/notes/ namespace.
...Johan
-- Johan Herland, <johan@herland.net> www.herland.net