Use more restrictive patterns for sideband progress scraping
To avoid scraping a non-progress message as though it were a progress item for the progress monitor, use a more restrictive pattern to watch the remote side's messages. These two regexps should match any message produced by C Git since 42e18fbf5f94 ("more compact progress display", Oct 2007), and which first appeared in Git 1.5.4. Change-Id: I57e34cf59d42c1dbcbd1a83dd6f499ce5e39d15d Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
parent
3a9295b894
commit
4c44810df4
|
@ -82,11 +82,11 @@ class SideBandInputStream extends InputStream {
|
||||||
|
|
||||||
static final int CH_ERROR = 3;
|
static final int CH_ERROR = 3;
|
||||||
|
|
||||||
private static Pattern P_UNBOUNDED = Pattern.compile(
|
private static Pattern P_UNBOUNDED = Pattern
|
||||||
"^([\\w ]+): (\\d+)( |, done)?.*", Pattern.DOTALL);
|
.compile("^([\\w ]+): +(\\d+)(?:, done\\.)? *$");
|
||||||
|
|
||||||
private static Pattern P_BOUNDED = Pattern.compile(
|
private static Pattern P_BOUNDED = Pattern
|
||||||
"^([\\w ]+):.*\\((\\d+)/(\\d+)\\).*", Pattern.DOTALL);
|
.compile("^([\\w ]+): +\\d+% +\\( *(\\d+)/ *(\\d+)\\)(?:, done\\.)? *$");
|
||||||
|
|
||||||
private final InputStream rawIn;
|
private final InputStream rawIn;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue