aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2010-06-24 18:41:21 -0700
committerShawn O. Pearce <spearce@spearce.org>2010-06-25 17:46:40 -0700
commitf18b853044b57f1ffd1a3698f05b19d51e9b9c1b (patch)
tree37701931ad836b5c6dca17ca0b5eac3cf1515a37 /org.eclipse.jgit/src/org
parenta63494edeead4670ac2d838d346ed0fcdfa2b181 (diff)
downloadjgit-f18b853044b57f1ffd1a3698f05b19d51e9b9c1b.tar.gz
jgit-f18b853044b57f1ffd1a3698f05b19d51e9b9c1b.zip
Consistently use getDirectory() for work tree state
This permits us to leave the implementation of these methods here in the Repository class, but later refactor how the directory is accessed into a subclass. Change-Id: I5785b2009c5b7cca0fb070a968e50814ce847076 Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit/src/org')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
index 0ee0ca9d32..4334234891 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/Repository.java
@@ -1194,7 +1194,7 @@ public class Repository {
// Pre Git-1.6 logic
if (new File(getWorkDir(), ".dotest").exists())
return RepositoryState.REBASING;
- if (new File(gitDir,".dotest-merge").exists())
+ if (new File(getDirectory(), ".dotest-merge").exists())
return RepositoryState.REBASING_INTERACTIVE;
// From 1.6 onwards
@@ -1211,7 +1211,7 @@ public class Repository {
return RepositoryState.REBASING_MERGE;
// Both versions
- if (new File(gitDir, "MERGE_HEAD").exists()) {
+ if (new File(getDirectory(), "MERGE_HEAD").exists()) {
// we are merging - now check whether we have unmerged paths
try {
if (!DirCache.read(this).hasUnmergedPaths()) {
@@ -1227,7 +1227,7 @@ public class Repository {
return RepositoryState.MERGING;
}
- if (new File(gitDir,"BISECT_LOG").exists())
+ if (new File(getDirectory(), "BISECT_LOG").exists())
return RepositoryState.BISECTING;
return RepositoryState.SAFE;
@@ -1455,7 +1455,7 @@ public class Repository {
* @throws IOException
*/
public String readMergeCommitMsg() throws IOException {
- File mergeMsgFile = new File(gitDir, Constants.MERGE_MSG);
+ File mergeMsgFile = new File(getDirectory(), Constants.MERGE_MSG);
try {
return new String(IO.readFully(mergeMsgFile));
} catch (FileNotFoundException e) {
@@ -1476,7 +1476,7 @@ public class Repository {
* @throws IOException
*/
public List<ObjectId> readMergeHeads() throws IOException {
- File mergeHeadFile = new File(gitDir, Constants.MERGE_HEAD);
+ File mergeHeadFile = new File(getDirectory(), Constants.MERGE_HEAD);
byte[] raw;
try {
raw = IO.readFully(mergeHeadFile);