diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-02-09 10:46:01 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-03-12 16:08:13 -0800 |
commit | 4c44810df406115c811890336eaa131a8413149b (patch) | |
tree | 2b1a46110564e29272f4eb3761572c2a999c45ca | |
parent | 3a9295b8942639b8ac9f161a84b20fe15896e6b6 (diff) | |
download | jgit-4c44810df406115c811890336eaa131a8413149b.tar.gz jgit-4c44810df406115c811890336eaa131a8413149b.zip |
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>
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java index dadc0638b3..0abbe7e09c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/SideBandInputStream.java @@ -82,11 +82,11 @@ class SideBandInputStream extends InputStream { static final int CH_ERROR = 3; - private static Pattern P_UNBOUNDED = Pattern.compile( - "^([\\w ]+): (\\d+)( |, done)?.*", Pattern.DOTALL); + private static Pattern P_UNBOUNDED = Pattern + .compile("^([\\w ]+): +(\\d+)(?:, done\\.)? *$"); - private static Pattern P_BOUNDED = Pattern.compile( - "^([\\w ]+):.*\\((\\d+)/(\\d+)\\).*", Pattern.DOTALL); + private static Pattern P_BOUNDED = Pattern + .compile("^([\\w ]+): +\\d+% +\\( *(\\d+)/ *(\\d+)\\)(?:, done\\.)? *$"); private final InputStream rawIn; |