• Russ Cox's avatar
    cmd/pack: fix match · 258c278e
    Russ Cox authored
    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.
    
    LGTM=r, dsymonds
    R=r, dsymonds
    CC=golang-codereviews
    https://golang.org/cl/65630046
    258c278e
Name
Last commit
Last update
api Loading commit data...
doc Loading commit data...
include Loading commit data...
lib Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.hgignore Loading commit data...
.hgtags Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...