git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Herland <johan@herland.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: Joachim Breitner <mail@joachim-breitner.de>,
	Git mailing list <git@vger.kernel.org>
Subject: Re: git-note -C changes commit type?
Date: Wed, 12 Feb 2014 10:50:50 +0100	[thread overview]
Message-ID: <CALKQrgdnGhc-y3WMf+zej4M+O4NMhLKusE-N6dX_xKVViZmQzA@mail.gmail.com> (raw)
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:
> 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

  parent reply	other threads:[~2014-02-12  9:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 17:23 git-note -C changes commit type? Joachim Breitner
2014-02-11 23:52 ` Johan Herland
2014-02-12  0:06   ` Junio C Hamano
2014-02-12  5:16     ` Kyle J. McKay
2014-02-12  9:50     ` Johan Herland [this message]
2014-02-12  9:54       ` [PATCH] notes: Disallow reusing non-blob as a note object Johan Herland
2014-02-14 15:19         ` Eric Sunshine
2014-02-14 16:19           ` Junio C Hamano
2014-02-12  8:53   ` git-note -C changes commit type? Joachim Breitner
2014-02-12 10:26     ` Johan Herland
2014-02-12 10:33       ` Joachim Breitner

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=CALKQrgdnGhc-y3WMf+zej4M+O4NMhLKusE-N6dX_xKVViZmQzA@mail.gmail.com \
    --to=johan@herland.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mail@joachim-breitner.de \
    /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).