]> source.dussan.org Git - jgit.git/commitdiff
Document that path parameters should use '/' as separator 45/18445/1
authorRobin Stocker <robin@nibor.org>
Fri, 15 Nov 2013 18:20:02 +0000 (19:20 +0100)
committerRobin Stocker <robin@nibor.org>
Fri, 15 Nov 2013 18:20:02 +0000 (19:20 +0100)
Bug: 421600
Change-Id: I505d994518aa608aaa797252433b6c97e2def5b4
Signed-off-by: Robin Stocker <robin@nibor.org>
14 files changed:
org.eclipse.jgit/src/org/eclipse/jgit/api/AddCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/BlameCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/CheckoutCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/CommitCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/LogCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/ResetCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/RmCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/StatusCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleAddCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleInitCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleStatusCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleSyncCommand.java
org.eclipse.jgit/src/org/eclipse/jgit/api/SubmoduleUpdateCommand.java

index ef2e987b4e13a0e4a0178953806064909f66a188..c23256c74b7a919b01e23bc080c9b48612fc58fb 100644 (file)
@@ -93,11 +93,15 @@ public class AddCommand extends GitCommand<DirCache> {
        }
 
        /**
+        * 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) {
index 12be64bb02fff4cba9863eeed65cc31f8674cb5e..11dfd1c585b33a951803b0222b6691cd9f70fe82 100644 (file)
@@ -86,9 +86,10 @@ public class BlameCommand extends GitCommand<BlameResult> {
        }
 
        /**
-        * Set file path
+        * Set file path.
         *
         * @param filePath
+        *            file path (with <code>/</code> as separator)
         * @return this command
         */
        public BlameCommand setFilePath(String filePath) {
index eb447f3142a03a0a5d3cb9d955958fba30316672..8dfd211a0810ce3780cc8826a3a879c33f8815c6 100644 (file)
@@ -305,15 +305,16 @@ public class CheckoutCommand extends GitCommand<Ref> {
        }
 
        /**
-        * 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) {
index b42c80f67b40a15801a5ad5240db27eb2ad4b8d0..f273eafe1f6d87fe062c915fa0a2e793aa97decd 100644 (file)
@@ -174,7 +174,7 @@ public class CleanCommand extends GitCommand<Set<String>> {
         * 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) {
index 399d78e09551341de6d3491749e1eb57acfd371a..21d7138c9fdea30391c966ded03b585315761682 100644 (file)
@@ -667,14 +667,14 @@ public class CommitCommand extends GitCommand<RevCommit> {
        }
 
        /**
-        * 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) {
index 51a233458fb29f685e87981f9c0d616bebe0158b..9690f799c1aa6e1fbe8878577294ac4d3a3601ec 100644 (file)
@@ -282,11 +282,11 @@ public class LogCommand extends GitCommand<Iterable<RevCommit>> {
 
        /**
         * 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) {
index 3a1c209a2df2952f7faa0ac529e95834567129a9..7c2192dd9f394932185a0519f4bee3ab6a5c27e5 100644 (file)
@@ -279,16 +279,17 @@ public class ResetCommand extends GitCommand<Ref> {
        }
 
        /**
-        * @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;
        }
 
index ac30ffcb7dcacb9f30388d10c7af0c0bc2571b75..c70b4aeaf25c56d987dc4b6d3387891cf117cc69 100644 (file)
@@ -104,7 +104,8 @@ public class RmCommand extends GitCommand<DirCache> {
 
        /**
         * @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) {
index eaf5483671f2f0debe51b1e05c8c829b8f7b064d..dee0a31b911ed00ac0a991e26c21601f75cda6ef 100644 (file)
@@ -89,7 +89,8 @@ public class StatusCommand extends GitCommand<Status> {
         * 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
         */
index bfef053d85db12570f8a7cc344bbbae134cac278..09e4cf0a1b11de0331537302826da6b72e39fed8 100644 (file)
@@ -93,6 +93,7 @@ public class SubmoduleAddCommand extends
         * Set repository-relative path of submodule
         *
         * @param path
+        *            (with <code>/</code> as separator)
         * @return this command
         */
        public SubmoduleAddCommand setPath(final String path) {
index e799bfb8bdc75b69c6d1c279fac95dbd2dc770bd..0ed02acc82d1183cae1b494de12e92db52f2217f 100644 (file)
@@ -83,6 +83,7 @@ public class SubmoduleInitCommand extends GitCommand<Collection<String>> {
         * Add repository-relative submodule path to initialize
         *
         * @param path
+        *            (with <code>/</code> as separator)
         * @return this command
         */
        public SubmoduleInitCommand addPath(final String path) {
index bbc01adbae9820b1ad61cca37acf5dd87661a3e8..6e89f9873ec2e05dba88957c7b94df43c41e5e5b 100644 (file)
@@ -83,6 +83,7 @@ public class SubmoduleStatusCommand extends
         * 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) {
index 11d3c5acca7fd8b5c8fa35c88354c50ecf7be710..e7fe71a8907430a59ae8740aeb4af46eb47f2359 100644 (file)
@@ -85,6 +85,7 @@ public class SubmoduleSyncCommand extends GitCommand<Map<String, String>> {
         * Add repository-relative submodule path to synchronize
         *
         * @param path
+        *            (with <code>/</code> as separator)
         * @return this command
         */
        public SubmoduleSyncCommand addPath(final String path) {
index 40f6a9f9a43fc849bf974243a7a3c773329bd75d..e2f356a08eff3cdfbedcd00016ad6d2d441719df 100644 (file)
@@ -110,6 +110,7 @@ public class SubmoduleUpdateCommand extends
         * Add repository-relative submodule path to initialize
         *
         * @param path
+        *            (with <code>/</code> as separator)
         * @return this command
         */
        public SubmoduleUpdateCommand addPath(final String path) {