Code

git-send-pack: Fix duplicate refname match
authorLinus Torvalds <torvalds@g5.osdl.org>
Tue, 12 Jul 2005 01:03:34 +0000 (18:03 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 12 Jul 2005 01:03:34 +0000 (18:03 -0700)
Cut-and-paste dup noticed by Junio.  It's not even harmless, since a
match also causes that match to be invalidated, so this made it
impossible to update an existing branch by name.

I'd only tested the case of "ref doesn't exist at all on the other end",
which worked fine.

send-pack.c

index 4c6adabdac808aa70f9040ec6733581f2ee00c0d..8ff61d1c43f6edf89b334f35b65699b04e04c656 100644 (file)
@@ -204,9 +204,6 @@ static int send_pack(int in, int out, int nr_match, char **match)
                if (read_ref(name, new_sha1) < 0)
                        continue;
 
-               if (nr_match && !path_match(name, nr_match, match))
-                       continue;
-
                if (!memcmp(ref->old_sha1, new_sha1, 20)) {
                        fprintf(stderr, "'%s' unchanged\n", name);
                        continue;