git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Edwin KempinNext: Edwin Kempin
Message 2 of 3 in “How does 'git notes --ref' work?”
  1. Edwin KempinJan 14, 2011
  2. Johan HerlandJan 14, 2011
  3. Edwin KempinJan 14, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.