Re: [PATCH 3/3] remote: don't prune when detecting overlapping refspecs

2013-06-21 Thread Junio C Hamano
Dennis Kaarsemaker writes: > +static int check_overlapping_remotes(struct remote *first, void *priv) { > + struct remote *second = priv; > + int i, j; > + if(!second) > + return for_each_remote(check_overlapping_remotes, first); > + if(first == second) > +

[PATCH 3/3] remote: don't prune when detecting overlapping refspecs

2013-06-21 Thread Dennis Kaarsemaker
When cloning a repo with --mirror, and adding more remotes later, get_stale_heads for origin would mark all refs from other repos as stale. There's no "good" way to solve, this so the best thing we can do is refusing to prune if we detect this and warning the user. Signed-off-by: Dennis Kaarsemake