* on pulling/cloning git notes
@ 2010-06-24 8:22 Christian MICHON
2010-06-24 9:48 ` Michael J Gruber
0 siblings, 1 reply; 5+ messages in thread
From: Christian MICHON @ 2010-06-24 8:22 UTC (permalink / raw)
To: git list
Hi list,
I've been playing recently with git notes and figured out how to push
my notes to my central gitolite server, tweaking .git/config in this
way (adding a push section):
[remote "gitolite"]
url = gitolite:daat
fetch = +refs/heads/*:refs/remotes/gitolite/*
push = +refs/notes/*:refs/notes/*
When trying to to a 'git clone --mirror' from that same gitolite
server, I was expecting to get back refs/notes, but I did not.
Did I miss something or git notes are actually not meant to be cloned/pulled?
--
Christian
--
http://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside !
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: on pulling/cloning git notes
2010-06-24 8:22 on pulling/cloning git notes Christian MICHON
@ 2010-06-24 9:48 ` Michael J Gruber
2010-06-24 12:25 ` Christian MICHON
0 siblings, 1 reply; 5+ messages in thread
From: Michael J Gruber @ 2010-06-24 9:48 UTC (permalink / raw)
To: Christian MICHON; +Cc: git list
Christian MICHON venit, vidit, dixit 24.06.2010 10:22:
> Hi list,
>
> I've been playing recently with git notes and figured out how to push
> my notes to my central gitolite server, tweaking .git/config in this
> way (adding a push section):
>
> [remote "gitolite"]
> url = gitolite:daat
> fetch = +refs/heads/*:refs/remotes/gitolite/*
> push = +refs/notes/*:refs/notes/*
>
> When trying to to a 'git clone --mirror' from that same gitolite
> server, I was expecting to get back refs/notes, but I did not.
>
> Did I miss something or git notes are actually not meant to be cloned/pulled?
>
As you can see from the default "fetch" line above, "refs/heads" are
fetched by default (when cloning, fetching etc.), but nothing else
(well, besides some tags). You can set up an additional fetch refspec to
get the notes also.
It's not done by default because it's up to you decide what to do with
the notes. Sometimes, you want them to end up in "refs/notes" so that
they are displayed by default. But maybe you want them in
"refs/notes/remotes/gitolites" e.g. and display them only on request
(--show-notes=remotes/gitolite), or merge them into your own notes.
Michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: on pulling/cloning git notes
2010-06-24 9:48 ` Michael J Gruber
@ 2010-06-24 12:25 ` Christian MICHON
2010-06-24 13:16 ` Michael J Gruber
0 siblings, 1 reply; 5+ messages in thread
From: Christian MICHON @ 2010-06-24 12:25 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git list
On Thu, Jun 24, 2010 at 11:48 AM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> As you can see from the default "fetch" line above, "refs/heads" are
> fetched by default (when cloning, fetching etc.), but nothing else
> (well, besides some tags). You can set up an additional fetch refspec to
> get the notes also.
I'm actually doing a fresh clone elsewhere, using 'git clone --mirror
gitolite:daat'.
I was expecting to grab everything from the remote refs, as in this
case my .git/config will look like this:
[remote "origin"]
fetch = +refs/*:refs/*
mirror = true
url = gitolite:daat
> It's not done by default because it's up to you decide what to do with
> the notes. Sometimes, you want them to end up in "refs/notes" so that
> they are displayed by default. But maybe you want them in
> "refs/notes/remotes/gitolites" e.g. and display them only on request
> (--show-notes=remotes/gitolite), or merge them into your own notes.
>
So the * in .git/config was misleading me. Instead I changed the fetch
to this after the original clone, then performed an incremental fetch
and it worked.
[remote "origin"]
fetch = +refs/heads/*:refs/notes/*
mirror = true
url = gitolite:daat
Thanks for the hint, Michael!
--
Christian
--
http://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside !
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: on pulling/cloning git notes
2010-06-24 12:25 ` Christian MICHON
@ 2010-06-24 13:16 ` Michael J Gruber
2010-06-24 13:27 ` Christian MICHON
0 siblings, 1 reply; 5+ messages in thread
From: Michael J Gruber @ 2010-06-24 13:16 UTC (permalink / raw)
To: Christian MICHON; +Cc: git list
Christian MICHON venit, vidit, dixit 24.06.2010 14:25:
> On Thu, Jun 24, 2010 at 11:48 AM, Michael J Gruber
> <git@drmicha.warpmail.net> wrote:
>> As you can see from the default "fetch" line above, "refs/heads" are
>> fetched by default (when cloning, fetching etc.), but nothing else
>> (well, besides some tags). You can set up an additional fetch refspec to
>> get the notes also.
>
> I'm actually doing a fresh clone elsewhere, using 'git clone --mirror
> gitolite:daat'.
You didn't say "--mirror" before ;)
>
> I was expecting to grab everything from the remote refs, as in this
> case my .git/config will look like this:
> [remote "origin"]
> fetch = +refs/*:refs/*
> mirror = true
> url = gitolite:daat
Hmmh. I have notes in the standard "refs/notes/commits", push them into
that same ref on the remote side (using an additional push refspec).
When I "clone --mirror" that I do get them back in "refs/notes/commits"
in the (bare) mirror repo.
> [remote "origin"]
> fetch = +refs/heads/*:refs/notes/*
> mirror = true
> url = gitolite:daat
>
> Thanks for the hint, Michael!
>
I'm glad it helped though I don't know why...
Did you push the notes into head refs?
Comparing the output of
git ls-remote gitolite:daat
to that of "git show-ref" in you local repos (the original one and the
mirror) may clear things up quite a bit.
Cheers,
Michael
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: on pulling/cloning git notes
2010-06-24 13:16 ` Michael J Gruber
@ 2010-06-24 13:27 ` Christian MICHON
0 siblings, 0 replies; 5+ messages in thread
From: Christian MICHON @ 2010-06-24 13:27 UTC (permalink / raw)
To: Michael J Gruber; +Cc: git list
On Thu, Jun 24, 2010 at 3:16 PM, Michael J Gruber
<git@drmicha.warpmail.net> wrote:
> Christian MICHON venit, vidit, dixit 24.06.2010 14:25:
>> On Thu, Jun 24, 2010 at 11:48 AM, Michael J Gruber
>> <git@drmicha.warpmail.net> wrote:
>>> As you can see from the default "fetch" line above, "refs/heads" are
>>> fetched by default (when cloning, fetching etc.), but nothing else
>>> (well, besides some tags). You can set up an additional fetch refspec to
>>> get the notes also.
>>
>> I'm actually doing a fresh clone elsewhere, using 'git clone --mirror
>> gitolite:daat'.
>
> You didn't say "--mirror" before ;)
yes I did... "When trying to to a 'git clone --mirror' from that same
gitolite"...
>
>>
>> I was expecting to grab everything from the remote refs, as in this
>> case my .git/config will look like this:
>> [remote "origin"]
>> fetch = +refs/*:refs/*
>> mirror = true
>> url = gitolite:daat
>
> Hmmh. I have notes in the standard "refs/notes/commits", push them into
> that same ref on the remote side (using an additional push refspec).
> When I "clone --mirror" that I do get them back in "refs/notes/commits"
> in the (bare) mirror repo.
>
>> [remote "origin"]
>> fetch = +refs/heads/*:refs/notes/*
>> mirror = true
>> url = gitolite:daat
>>
>> Thanks for the hint, Michael!
>>
>
> I'm glad it helped though I don't know why...
>
> Did you push the notes into head refs?
yes apparently I did. I thought it did help, I must have pushed the
wrong way originally.
I'll fix that. Actually --mirror works fine and I'm actually getting
the commit linked to the notes.
thanks for double checking.
--
Christian
--
http://detaolb.sourceforge.net/, a linux distribution for Qemu with Git inside !
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-24 13:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-24 8:22 on pulling/cloning git notes Christian MICHON
2010-06-24 9:48 ` Michael J Gruber
2010-06-24 12:25 ` Christian MICHON
2010-06-24 13:16 ` Michael J Gruber
2010-06-24 13:27 ` Christian MICHON
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).