Re: [PATCH 1/3] remote: Add warnings about mixin --mirror and other remotes
- From
Dennis Kaarsemaker <dennis@kaarsemaker.net>
- Date
- Jun 23, 2013, 21:43 UTC
- Message-ID
- <1372023811.24315.15.camel@localhost>
- In-Reply-To
- <7vvc54ed53.fsf@alter.siamese.dyndns.org>
On zo, 2013-06-23 at 14:22 -0700, Junio C Hamano wrote:
Show 14 quoted lines
> Dennis Kaarsemaker <dennis@kaarsemaker.net> writes: > > > Equality for > > wildcards is allowed and tested for, so do we really want to 'outlaw' > > equality of non-wildcard refspecs? > > I am not sure what you mean by "equality for wildcards is allowed". > Do you mean this pair of remote definition is sane and not warned? > > [remote "one"] > fetch = refs/heads/*:refs/remotes/mixed/* > > [remote "two"] > fetch = refs/heads/*:refs/remotes/mixed/*
I personally don't consider them very sane and didn't originally support that. But this behavior is tested for in t5505-remote.sh test 27, which started failing until I stopped warning for equal refspecs. This support for "alt remotes" in prune was added by c175a7ad in 2008. The commit message for that commit give a plausible reason for using them.
Show 10 quoted lines
> For non-wildcard ones, I think these pairs are both suspects for > possible clashes and want to be warned. > > (1) literal-vs-literal > > [remote "one"] > fetch = refs/heads/master:refs/heads/origin > > [remote "two"] > fetch = refs/heads/master:refs/heads/origin
I agree, but c175a7ad would disagree.
Show 8 quoted lines
> (2) literal-vs-wildcard > > [remote "one"] > fetch = refs/heads/*:refs/remotes/origin/* > > [remote "two"] > fetch = refs/heads/master:refs/remotes/origin/master >
Agreed and was already covered in v1.
-- Dennis Kaarsemaker www.kaarsemaker.net