Re: [PATCHv4 00/21] git notes merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 21 October 2010, Sverre Rabbelier wrote:
> On Wed, Oct 20, 2010 at 21:08, Johan Herland wrote:
> > - Fetching and pushing note refs:
> > Â- Add refs/notes/* to default fetch refspec?
> > Â- A way to specify (at clone time) which refspec(s) to set up?
> > Â- A way for the remote repo to hint at which refspecs you might
> > want to set up (by default?)
>
> Didn't we already discuss this earlier? Can you summarize (or at
> least link to) that discussion?

Yes, sorry for not answering you earlier. Here's what you wrote in the 
previous thread:

On Saturday 09 October 2010, Sverre Rabbelier wrote:
> Heya,
>
> On Sat, Oct 9, 2010 at 03:08, Johan Herland <johan@xxxxxxxxxxx> wrote:
> > - Fetching and pushing note refs:
> >  - Add refs/notes/* to default fetch refspec?
>
> Or at least add a '--notes[=<notes namespace>]' to fetch, pull, and
> push.

Agreed, at least that.

In order to promote sharing of notes, though, I'd like for it to be 
possible to configure the repo so that a vanilla 'git fetch' also 
updates your notes. In fact, I wonder if this should even be made the 
default.

> >  - A way to specify (at clone time) which refspec(s) to set up?
>
> How would that look like?

Maybe add an option to 'git clone' (and 'git remote add') that specifies 
the refspec you want to use in your config for that remote. Something 
like:

  git clone --fetch="+refs/heads/*:refs/remotes/origin/*" \
            --fetch="+refs/notes/*:refs/remotes/origin/notes/*" \
            <source_url> ...

...will set up the following config:

  [remote "origin"]
        url = <source_url>
        fetch = +refs/heads/*:refs/remotes/origin/*
        fetch = +refs/notes/*:refs/remotes/origin/notes/*

Obviously, we would probably want to provide shorthands for the most 
common refspecs, like:

  git clone --fetch=default,notes <source_url> ...

or

  git clone --fetch-heads --fetch-notes <source_url> ...

> >  - A way for the remote repo to hint at which refspecs you might
> > want to set up (by default?)
>
> I assume this would be a generic mechanism of sorts? Are there any
> other use cases for this other than notes?

Yes, I believe so (although I haven't thought much about this, yet). 
There's been earlier discussions on hiding certain branches from view. 
This could maybe be solved by the server suggesting a refspec that 
excludes the stuff you don't want to share (by default). Similary, the 
refspec could _include_ notes namespaces that you do want to share.

Of course (as today) the client should be free to demand a different 
refspec, e.g. if it wants access to everything, or if it's only 
interested in a subset of the "default" refs.


...Johan

-- 
Johan Herland, <johan@xxxxxxxxxxx>
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]