Descriptioncmd/pack: fix match
Match used len(ar.files) == 0 to mean "match everything"
but it also deleted matched things from the list, so once you
had matched everything you asked for, match returned true
for whatever was left in the archive too.
Concretely, if you have an archive containing f1, f2, then
pack t foo.a f1
would match f1 and then, because len(ar.files) == 0 after
deleting f1 from the match list, also match f2.
Avoid the problem by recording explicitly whether match
matches everything.
Patch Set 1 #Patch Set 2 : diff -r 168fe6a1dda1 https://code.google.com/p/go/ #Patch Set 3 : diff -r 34d204bcd7a9 https://code.google.com/p/go/ #
MessagesTotal messages: 5
|