/** * Set whether the repository is bare or not * * @param bare * whether the repository is bare or not * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both * directory and gitDir are specified * @return this instance */ public InitCommand setBare(boolean bare) { validateDirs(directory, gitDir, bare); this.bare = bare; return this; }
/** * The optional directory associated with the init operation. If no * directory is set, we'll use the current directory * * @param directory * the directory to init to * @return this instance * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both * directory and gitDir are specified */ public InitCommand setDirectory(File directory) throws IllegalStateException { validateDirs(directory, gitDir, bare); this.directory = directory; return this; }
/** * Set the repository meta directory (.git) * * @param gitDir * the repository meta directory * @return this instance * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both * directory and gitDir are specified * @since 3.6 */ public InitCommand setGitDir(File gitDir) throws IllegalStateException { validateDirs(directory, gitDir, bare); this.gitDir = gitDir; return this; }
/** * Set whether the repository is bare or not * * @param bare * whether the repository is bare or not * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both * directory and gitDir are specified * @return this instance */ public InitCommand setBare(boolean bare) { validateDirs(directory, gitDir, bare); this.bare = bare; return this; }
/** * @param bare * whether the repository is bare or not * @throws IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both * directory and gitDir are specified * @return this instance */ public InitCommand setBare(boolean bare) { validateDirs(directory, gitDir, bare); this.bare = bare; return this; } }
/** * The optional directory associated with the init operation. If no * directory is set, we'll use the current directory * * @param directory * the directory to init to * @return this instance * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both * directory and gitDir are specified */ public InitCommand setDirectory(File directory) throws IllegalStateException { validateDirs(directory, gitDir, bare); this.directory = directory; return this; }
/** * @param gitDir * the repository meta directory * @return this instance * @throws IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both * directory and gitDir are specified * @since 3.6 */ public InitCommand setGitDir(File gitDir) throws IllegalStateException { validateDirs(directory, gitDir, bare); this.gitDir = gitDir; return this; }
/** * The optional directory associated with the init operation. If no * directory is set, we'll use the current directory * * @param directory * the directory to init to * @return this instance * @throws IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both * directory and gitDir are specified */ public InitCommand setDirectory(File directory) throws IllegalStateException { validateDirs(directory, gitDir, bare); this.directory = directory; return this; }
/** * Set the repository meta directory (.git) * * @param gitDir * the repository meta directory * @return this instance * @throws java.lang.IllegalStateException * if the combination of directory, gitDir and bare is illegal. * E.g. if for a non-bare repository directory and gitDir point * to the same directory of if for a bare repository both * directory and gitDir are specified * @since 3.6 */ public InitCommand setGitDir(File gitDir) throws IllegalStateException { validateDirs(directory, gitDir, bare); this.gitDir = gitDir; return this; }