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

Re: git-note -C changes commit type?

From
Johan Herland <johan@herland.net>
Date
Feb 12, 2014, 09:50 UTC
Message-ID
<CALKQrgdnGhc-y3WMf+zej4M+O4NMhLKusE-N6dX_xKVViZmQzA@mail.gmail.com>
In-Reply-To
<xmqqvbwlnqi1.fsf@gitster.dls.corp.google.com>
On Wed, Feb 12, 2014 at 1:06 AM, Junio C Hamano <gitster@pobox.com> wrote:
Show 14 quoted lines
> Johan Herland <johan@herland.net> writes:
>> There is currently no way the "git notes" commands will allow you to
>> store the 3d7de37 commit object directly as a note. There is also
>> (AFAICS) no easy workaround (git fast-import could've been a
>> workaround if it did not already require the first N/notemodify
>> argument to be a blob object). The best alternative, off the top of my
>> head, would be to write your own program using the notes.h API to
>> manipulate the notes tree directly (or - suboptimally - use other
>> low-level Git operations to do the same).
>
> Even worse. I do not think such a non-blob object in the notes tree
> does not participate in the reachability at all, so you won't be
> able to fetch "refs/notes/whatever" and expect to get a useful
> result.
s/non-blob/non-(blob-or-tree)/

Any object type that is deemed reachable by reference from a regular git tree object will also be usable (as far as reachability goes) in a notes tree.

> I do not think storing the raw bits of commit object as a
> blob in the notes tree is useful behaviour, either.  The command
> probably should refuse to get anything non-blob via that option.
Patch coming up...
> Perhaps the notes entry should just note the object name of whatever
> commit it wants to refer to in a *blob*?
Agreed.
...Johan
-- 
Johan Herland, <johan@herland.net>
www.herland.net
Previous: Kyle J. McKayNext: Johan Herland
Message 5 of 11 in “git-note -C changes commit type?”
  1. Joachim BreitnerFeb 11, 2014
  2. Johan HerlandFeb 11, 2014
  3. Junio C HamanoFeb 12, 2014
  4. Kyle J. McKayFeb 12, 2014
  5. Johan HerlandFeb 12, 2014
  6. notes: Disallow reusing non-blob as a note objectJohan Herland, Feb 12, 2014
  7. Eric SunshineFeb 14, 2014
  8. Junio C HamanoFeb 14, 2014
  9. Joachim BreitnerFeb 12, 2014
  10. Johan HerlandFeb 12, 2014
  11. Joachim BreitnerFeb 12, 2014

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.