Re: [PATCHv4 00/21] git notes merge

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Johan Herland
Date: Friday, October 22, 2010 - 8:41 am

On Thursday 21 October 2010, Sverre Rabbelier wrote:

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

On Saturday 09 October 2010, Sverre Rabbelier wrote:

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.


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> ...


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@herland.net>
www.herland.net
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCHv4 00/21] git notes merge, Johan Herland, (Wed Oct 20, 7:08 pm)
Re: [PATCHv4 06/21] notes.h/c: Propagate combine_notes_fn ..., Jonathan Nieder, (Wed Oct 20, 10:21 pm)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Thu Oct 21, 2:00 pm)
Re: [PATCHv4 00/21] git notes merge, Junio C Hamano, (Thu Oct 21, 4:20 pm)
Re: [PATCHv4 00/21] git notes merge, Jonathan Nieder, (Thu Oct 21, 4:30 pm)
Re: [PATCHv4 00/21] git notes merge, Johan Herland, (Fri Oct 22, 8:41 am)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Fri Oct 22, 8:54 am)
Re: [PATCHv4 00/21] git notes merge, Johan Herland, (Fri Oct 22, 3:28 pm)
Re: [PATCHv4 00/21] git notes merge, Johan Herland, (Fri Oct 22, 5:47 pm)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Fri Oct 22, 6:38 pm)
Re: [PATCHv4 00/21] git notes merge, Sverre Rabbelier, (Fri Oct 22, 6:44 pm)