Browse Source

Correct GIT_INDEX_FILE environment variable

This is GIT_INDEX_FILE, not GIT_INDEX.

Change-Id: Ib3af28ba196f74c8cb4d318b57ea346bb90f9a1e
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
tags/v0.11.1
Shawn O. Pearce 13 years ago
parent
commit
0cd76ab65d

+ 2
- 2
org.eclipse.jgit/src/org/eclipse/jgit/lib/BaseRepositoryBuilder.java View File

import static org.eclipse.jgit.lib.Constants.GIT_ALTERNATE_OBJECT_DIRECTORIES_KEY; import static org.eclipse.jgit.lib.Constants.GIT_ALTERNATE_OBJECT_DIRECTORIES_KEY;
import static org.eclipse.jgit.lib.Constants.GIT_CEILING_DIRECTORIES_KEY; import static org.eclipse.jgit.lib.Constants.GIT_CEILING_DIRECTORIES_KEY;
import static org.eclipse.jgit.lib.Constants.GIT_DIR_KEY; import static org.eclipse.jgit.lib.Constants.GIT_DIR_KEY;
import static org.eclipse.jgit.lib.Constants.GIT_INDEX_KEY;
import static org.eclipse.jgit.lib.Constants.GIT_INDEX_FILE_KEY;
import static org.eclipse.jgit.lib.Constants.GIT_OBJECT_DIRECTORY_KEY; import static org.eclipse.jgit.lib.Constants.GIT_OBJECT_DIRECTORY_KEY;
import static org.eclipse.jgit.lib.Constants.GIT_WORK_TREE_KEY; import static org.eclipse.jgit.lib.Constants.GIT_WORK_TREE_KEY;


} }


if (getIndexFile() == null) { if (getIndexFile() == null) {
String val = sr.getenv(GIT_INDEX_KEY);
String val = sr.getenv(GIT_INDEX_FILE_KEY);
if (val != null) if (val != null)
setIndexFile(new File(val)); setIndexFile(new File(val));
} }

+ 1
- 1
org.eclipse.jgit/src/org/eclipse/jgit/lib/Constants.java View File

/** /**
* The environment variable that tells us which file holds the Git index. * The environment variable that tells us which file holds the Git index.
*/ */
public static final String GIT_INDEX_KEY = "GIT_INDEX";
public static final String GIT_INDEX_FILE_KEY = "GIT_INDEX_FILE";


/** /**
* The environment variable that tells us where objects are stored * The environment variable that tells us where objects are stored

Loading…
Cancel
Save