Fix the regex used to match patch set replacements during receive

We wanted the /new suffix to be optional.

Signed-off-by: Shawn O. Pearce <sop@google.com>
This commit is contained in:
Shawn O. Pearce
2008-12-29 16:10:08 -08:00
parent de867c73ce
commit cd2cb5f5f9

View File

@@ -51,7 +51,7 @@ import java.util.regex.Pattern;
class Receive extends AbstractGitCommand {
private static final String NEW_CHANGE = "refs/for/";
private static final Pattern NEW_PATCHSET =
Pattern.compile("^refs/changes/(?:[0-9][0-9]/)?([1-9][0-9]*)(?:/new)$");
Pattern.compile("^refs/changes/(?:[0-9][0-9]/)?([1-9][0-9]*)(?:/new)?$");
private final Set<String> reviewerEmail = new HashSet<String>();
private final Set<String> ccEmail = new HashSet<String>();