Skip to content

Commit

Permalink
match_push_refs(): nobody sets src->peer_ref anymore
Browse files Browse the repository at this point in the history
In ancient times, we used to disallow the same source ref to be
pushed to more than one places, e.g. "git push there master:master
master:naster" was disallowed.  We later lifted this restriction
with db27ee6 (send-pack: allow the same source to be pushed
more than once., 2005-08-06) and there no longer is anybody that
sets peer_ref for the source side of the ref list in the push
codepath since then.

Remove one leftover no-op in a loop that iterates over the source
side of ref list (i.e. our local ref) to see if it can/should be
sent to a matching destination ref while skipping ones that is
marked with peer_ref (which will never exist, so we do not skip
anything).

Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Junio C Hamano committed Mar 4, 2013
1 parent e6363a4 commit 703e8e6
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -1227,9 +1227,6 @@ int match_push_refs(struct ref *src, struct ref **dst,
const struct refspec *pat = NULL;
char *dst_name;

if (ref->peer_ref)
continue;

dst_name = get_ref_match(rs, nr_refspec, ref, send_mirror, FROM_SRC, &pat);
if (!dst_name)
continue;
Expand Down

0 comments on commit 703e8e6

Please sign in to comment.