aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2014-11-24 21:06:30 -0800
committerShawn Pearce <sop@google.com>2014-11-25 11:35:54 -0800
commit98c75a7ca2218208dc7951ec2bf3cf352fb3d6df (patch)
tree917b3b97f0f0aa7e054fd24e88168e0e1dfc19cc /org.eclipse.jgit/src/org
parentb34ea11720eca6d6523e7948a929693146640daf (diff)
downloadjgit-98c75a7ca2218208dc7951ec2bf3cf352fb3d6df.tar.gz
jgit-98c75a7ca2218208dc7951ec2bf3cf352fb3d6df.zip
Fix two nits about DirCacheEntry constructors
Explicitly pass STAGE_0 when creating a DirCacheEntry from String. This matches the immediate next constructor that accepts the int stage argument better, making the code easier to read. Fix a weird line break where the comma was orphaned by itself. Change-Id: Icf0970dd02a63877f9e41b51b982b0265e8b8887
Diffstat (limited to 'org.eclipse.jgit/src/org')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java
index 65188c8f43..458cd98e4b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheEntry.java
@@ -203,7 +203,6 @@ public class DirCacheEntry {
if (mightBeRacilyClean(smudge_s, smudge_ns))
smudgeRacilyClean();
-
}
/**
@@ -217,7 +216,7 @@ public class DirCacheEntry {
* or DirCache file.
*/
public DirCacheEntry(final String newPath) {
- this(Constants.encode(newPath));
+ this(Constants.encode(newPath), STAGE_0);
}
/**
@@ -269,8 +268,9 @@ public class DirCacheEntry {
if (!isValidPath(newPath))
throw new InvalidPathException(toString(newPath));
if (stage < 0 || 3 < stage)
- throw new IllegalArgumentException(MessageFormat.format(JGitText.get().invalidStageForPath
- , stage, toString(newPath)));
+ throw new IllegalArgumentException(MessageFormat.format(
+ JGitText.get().invalidStageForPath,
+ stage, toString(newPath)));
info = new byte[INFO_LEN];
infoOffset = 0;