Thread (35 messages) flat view 35 messages, 3 authors, 2016-06-15

Re: [PATCHv4 00/21] git notes merge

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:49:51

Heya,

On Fri, Oct 22, 2010 at 17:47, Johan Herland [off-list ref] wrote:
On Friday 22 October 2010, Sverre Rabbelier wrote:
quoted
I think notes directly under /refs/notes/ should be shared by default,
but those in sub-refs (such as the /refs/notes/am/ that's been
mentioned before) should not.
In theory that would make sense, but how you write that as a refspec? AFAIK,
refspecs don't (yet) support a syntax for (a) _excluding_ something from a
glob, and certainly not (b) excluding all "sub-refs" from a glob.
Indeed, which I think is a shame. For that matter, I'd love to be able
to have negative globs for branches in general (e.g., 'git log
--branches :-heads/hidden/**).
Alternatively, we could share everything under refs/notes/, except
/refs/notes/local/ (or refs/notes/private/ or whatever). That would just
require support for (a)...
That goes against how notes are used though. The refs/notes/* space is
the one that is shown by default, not refs/notes/local/*.
quoted
Who's going to type that out though? The only use case I can think of
is if you want to be able to give someone a line they can paste and be
set right away, but I don't see why in that case pasting multiple
commands (i.e., calling 'git config' a few times) wouldn't suffice.
You might be right. I was thinking that before we provide shorthands, we
should provide an option that let you specify _any_ refspec. Sort of as a
fallback if somebody's scenario doesn't fit into any of the shorthands.

But as you say, this can also be done with a few calls to git config.
[...]
quoted
Adding refspec shorthands _does_ make sense. However, it might make
more sense to put those under 'git remote' instead?
I'd say _both_ 'git remote' and 'git clone'.
I think getting those shorthands in git config/git remote is step one,
if we do want that. Then, if desired, we can add that to git clone.

quoted
That sounds like a good use case.
But I believe we need to extend the refspec syntax to support at least (a)
from above (excluding named entries from a refspec glob) in order to support
hiding of certain refs. Still, I think it would be a useful addition.
Agreed.

-- 
Cheers,

Sverre Rabbelier
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help