* directories.
*
* @param bare
- * if true, a bare repository is created.
- *
+ * if true, a bare repository (a repository without a working
+ * directory) is created.
* @throws IOException
* in case of IO problem
*/
* @throws IOException
* if the index can not be read
* @throws NoWorkTreeException
- * if this is bare (see {@link #isBare()})
+ * if this is bare, which implies it has no working directory.
+ * See {@link #isBare()}.
*/
public GitIndex getIndex() throws IOException, NoWorkTreeException {
if (isBare())
/**
* @return the index file location
* @throws NoWorkTreeException
- * if this is bare (see {@link #isBare()})
+ * if this is bare, which implies it has no working directory.
+ * See {@link #isBare()}.
*/
public File getIndexFile() throws NoWorkTreeException {
if (isBare())
* @return a cache representing the contents of the specified index file (if
* it exists) or an empty cache if the file does not exist.
* @throws NoWorkTreeException
- * if the repository is bare (lacks a working directory).
+ * if this is bare, which implies it has no working directory.
+ * See {@link #isBare()}.
* @throws IOException
* the index file is present but could not be read.
* @throws CorruptObjectException
* @return a cache representing the contents of the specified index file (if
* it exists) or an empty cache if the file does not exist.
* @throws NoWorkTreeException
- * if the repository is bare (lacks a working directory).
+ * if this is bare, which implies it has no working directory.
+ * See {@link #isBare()}.
* @throws IOException
* the index file is present but could not be read, or the lock
* could not be obtained.
}
/**
- * @return the "bare"-ness of this Repository
+ * @return true if this is bare, which implies it has no working directory.
*/
public boolean isBare() {
return workTree == null;
* @return the root directory of the working tree, where files are checked
* out for viewing and editing.
* @throws NoWorkTreeException
- * if the repository is bare and has no working directory.
+ * if this is bare, which implies it has no working directory.
+ * See {@link #isBare()}.
*/
public File getWorkTree() throws NoWorkTreeException {
if (isBare())
* {@code null} if this file doesn't exist
* @throws IOException
* @throws NoWorkTreeException
- * if the repository is "bare"
+ * if this is bare, which implies it has no working directory.
+ * See {@link #isBare()}.
*/
public String readMergeCommitMsg() throws IOException, NoWorkTreeException {
if (isBare() || getDirectory() == null)
* exists but is empty {@code null} will be returned
* @throws IOException
* @throws NoWorkTreeException
- * if the repository is "bare"
+ * if this is bare, which implies it has no working directory.
+ * See {@link #isBare()}.
*/
public List<ObjectId> readMergeHeads() throws IOException, NoWorkTreeException {
if (isBare() || getDirectory() == null)