Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(329)

Issue 65630046: code review 65630046: cmd/pack: fix match (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 4 months ago by rsc
Modified:
11 years, 4 months ago
Reviewers:
r, gobot, dsymonds
CC:
r, dsymonds, golang-codereviews
Visibility:
Public.

Description

cmd/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/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+24 lines, -6 lines) Patch
M src/cmd/pack/pack.go View 1 3 chunks +8 lines, -6 lines 0 comments Download
M src/cmd/pack/pack_test.go View 1 3 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 5
rsc
Hello r (cc: dsymonds, golang-codereviews@googlegroups.com), I'd like you to review this change to https://code.google.com/p/go/
11 years, 4 months ago (2014-02-20 01:34:25 UTC) #1
r
LGTM
11 years, 4 months ago (2014-02-20 01:36:20 UTC) #2
dsymonds
LGTM This improves my situation.
11 years, 4 months ago (2014-02-20 01:40:03 UTC) #3
rsc
*** Submitted as https://code.google.com/p/go/source/detail?r=50c8fc924389 *** cmd/pack: fix match Match used len(ar.files) == 0 to mean ...
11 years, 4 months ago (2014-02-20 20:50:34 UTC) #4
gobot
11 years, 4 months ago (2014-02-20 20:56:04 UTC) #5
Message was sent while issue was closed.
This CL appears to have broken the freebsd-amd64 builder.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b