}
/**
+ * Add a path to a file/directory whose content should be added.
+ * <p>
+ * A directory name (e.g. <code>dir</code> to add <code>dir/file1</code> and
+ * <code>dir/file2</code>) can also be given to add all files in the
+ * directory, recursively. Fileglobs (e.g. *.c) are not yet supported.
+ *
* @param filepattern
- * File to add content from. Also a leading directory name (e.g.
- * dir to add dir/file1 and dir/file2) can be given to add all
- * files in the directory, recursively. Fileglobs (e.g. *.c) are
- * not yet supported.
+ * repository-relative path of file/directory to add (with
+ * <code>/</code> as separator)
* @return {@code this}
*/
public AddCommand addFilepattern(String filepattern) {
}
/**
- * Set file path
+ * Set file path.
*
* @param filePath
+ * file path (with <code>/</code> as separator)
* @return this command
*/
public BlameCommand setFilePath(String filePath) {
}
/**
- * Add a single path to the list of paths to check out. To check out all
- * paths, use {@link #setAllPaths(boolean)}.
+ * Add a single slash-separated path to the list of paths to check out. To
+ * check out all paths, use {@link #setAllPaths(boolean)}.
* <p>
* If this option is set, neither the {@link #setCreateBranch(boolean)} nor
* {@link #setName(String)} option is considered. In other words, these
* options are exclusive.
*
* @param path
- * path to update in the working tree and index
+ * path to update in the working tree and index (with
+ * <code>/</code> as separator)
* @return {@code this}
*/
public CheckoutCommand addPath(String path) {
* If paths are set, only these paths are affected by the cleaning.
*
* @param paths
- * the paths to set
+ * the paths to set (with <code>/</code> as separator)
* @return {@code this}
*/
public CleanCommand setPaths(Set<String> paths) {
}
/**
- * Commit dedicated path only
- *
+ * Commit dedicated path only.
+ * <p>
* This method can be called several times to add multiple paths. Full file
* paths are supported as well as directory paths; in the latter case this
- * commits all files/ directories below the specified path.
+ * commits all files/directories below the specified path.
*
* @param only
- * path to commit
+ * path to commit (with <code>/</code> as separator)
* @return {@code this}
*/
public CommitCommand setOnly(String only) {
/**
* Show only commits that affect any of the specified paths. The path must
- * either name a file or a directory exactly. Note that regex expressions or
- * wildcards are not supported.
+ * either name a file or a directory exactly and use <code>/</code> (slash)
+ * as separator. Note that regex expressions or wildcards are not supported.
*
* @param path
- * a path is relative to the top level of the repository
+ * a repository-relative path (with <code>/</code> as separator)
* @return {@code this}
*/
public LogCommand addPath(String path) {
}
/**
- * @param file
- * the file to add
+ * @param path
+ * repository-relative path of file/directory to reset (with
+ * <code>/</code> as separator)
* @return this instance
*/
- public ResetCommand addPath(String file) {
+ public ResetCommand addPath(String path) {
if (mode != null)
throw new JGitInternalException(MessageFormat.format(
JGitText.get().illegalCombinationOfArguments, "<paths>...",
"[--mixed | --soft | --hard]")); //$NON-NLS-1$
- filepaths.add(file);
+ filepaths.add(path);
return this;
}
/**
* @param filepattern
- * File to remove.
+ * repository-relative path of file to remove (with
+ * <code>/</code> as separator)
* @return {@code this}
*/
public RmCommand addFilepattern(String filepattern) {
* supported.
*
* @param path
- * a path is relative to the top level of the repository
+ * repository-relative path of file/directory to show status for
+ * (with <code>/</code> as separator)
* @return {@code this}
* @since 3.1
*/
* Set repository-relative path of submodule
*
* @param path
+ * (with <code>/</code> as separator)
* @return this command
*/
public SubmoduleAddCommand setPath(final String path) {
* Add repository-relative submodule path to initialize
*
* @param path
+ * (with <code>/</code> as separator)
* @return this command
*/
public SubmoduleInitCommand addPath(final String path) {
* Add repository-relative submodule path to limit status reporting to
*
* @param path
+ * (with <code>/</code> as separator)
* @return this command
*/
public SubmoduleStatusCommand addPath(final String path) {
* Add repository-relative submodule path to synchronize
*
* @param path
+ * (with <code>/</code> as separator)
* @return this command
*/
public SubmoduleSyncCommand addPath(final String path) {
* Add repository-relative submodule path to initialize
*
* @param path
+ * (with <code>/</code> as separator)
* @return this command
*/
public SubmoduleUpdateCommand addPath(final String path) {