git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Joachim Breitner <mail@joachim-breitner.de>
To: git@vger.kernel.org
Subject: git-note -C changes commit type?
Date: Tue, 11 Feb 2014 17:23:27 +0000	[thread overview]
Message-ID: <1392139407.12790.7.camel@kirk> (raw)

[-- Attachment #1: Type: text/plain, Size: 1321 bytes --]

Hi,

judging from the documentation I got the impression that I can pass any
git object has to "git note -C <hash>" and it would stored as-is. But it
seems the objects gets mangled somehow...

(I want to attach a commit object as a note, to reference the history of
a feature before the final cleanup rebase. For that I turn the reflog
into a series of commits, and the final commit is the one I want to
store there.)

$ mkdir foo
$ cd foo/
$ echo foo > a
$ git init
Initialisierte leeres Git-Repository in /tmp/foo/.git/
$ git add a
$ git commit -m 'A commit'
[master (Basis-Commit) 3d7de37] A commit
 1 file changed, 1 insertion(+)
 create mode 100644 a
$ echo foo2 > a
$ git commit -m 'A commit 2' -a
[master e1bfac4] A commit 2
 1 file changed, 1 insertion(+), 1 deletion(-)
$ git notes --ref history add -C 3d7de37 e1bfac4
$ git ls-tree notes/history
100644 blob 5b73d5152e6207e3a2b67e57ca3a2cb94d12061e e1bfac434ebd3135a3784f6fc802f235098eebd0

I was expecting 3d7de37 to be referenced here.

Is that a bug, or is storing commits as notes not supported?

Thanks,
Joachim


-- 
Joachim “nomeata” Breitner
  mail@joachim-breitner.de • http://www.joachim-breitner.de/
  Jabber: nomeata@joachim-breitner.de  • GPG-Key: 0x4743206C
  Debian Developer: nomeata@debian.org

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

             reply	other threads:[~2014-02-11 17:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 17:23 Joachim Breitner [this message]
2014-02-11 23:52 ` git-note -C changes commit type? 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
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=1392139407.12790.7.camel@kirk \
    --to=mail@joachim-breitner.de \
    --cc=git@vger.kernel.org \
    /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).