summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Nieder <jrn@google.com>2016-08-08 18:50:01 -0700
committerJonathan Nieder <jrn@google.com>2016-08-08 18:51:32 -0700
commita9b87de97090b4f7d25ace0525edc1268cfa737f (patch)
treea4ec8e84b79fffe0f0e9808218c0fb0665704cd0
parent300787b8cf1a2168a1f640035b31651d6a7f95fd (diff)
downloadjgit-a9b87de97090b4f7d25ace0525edc1268cfa737f.tar.gz
jgit-a9b87de97090b4f7d25ace0525edc1268cfa737f.zip
RepoCommand: Avoid group lists shadowing groups strings
Reported-by: David Pursehouse <david.pursehouse@gmail.com> Change-Id: I9e9b021d335bda4d58b6bcc30f59b81ac5b37724 Signed-off-by: Jonathan Nieder <jrn@google.com>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java14
2 files changed, 10 insertions, 10 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
index ca976a1a3a..9b7f094d0f 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
@@ -107,7 +107,7 @@ import org.eclipse.jgit.util.FileUtils;
public class RepoCommand extends GitCommand<RevCommit> {
private String path;
private String uri;
- private String groups;
+ private String groupsParam;
private String branch;
private String targetBranch = Constants.HEAD;
private boolean recordRemoteBranch = false;
@@ -286,7 +286,7 @@ public class RepoCommand extends GitCommand<RevCommit> {
* @return this command
*/
public RepoCommand setGroups(String groups) {
- this.groups = groups;
+ this.groupsParam = groups;
return this;
}
@@ -478,7 +478,7 @@ public class RepoCommand extends GitCommand<RevCommit> {
git = new Git(repo);
ManifestParser parser = new ManifestParser(
- includedReader, path, branch, uri, groups, repo);
+ includedReader, path, branch, uri, groupsParam, repo);
try {
parser.read(inputStream);
for (RepoProject proj : parser.getFilteredProjects()) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java
index d29f6c01e2..ff4a3ed1c6 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoProject.java
@@ -167,14 +167,14 @@ public class RepoProject implements Comparable<RepoProject> {
* a SHA-1 or branch name or tag name
* @param remote
* name of the remote definition
- * @param groups
+ * @param groupsParam
* comma separated group list
*/
public RepoProject(String name, String path, String revision,
- String remote, String groups) {
+ String remote, String groupsParam) {
this(name, path, revision, remote, new HashSet<String>(), null);
- if (groups != null && groups.length() > 0)
- this.setGroups(groups);
+ if (groupsParam != null && groupsParam.length() > 0)
+ this.setGroups(groupsParam);
}
/**
@@ -191,14 +191,14 @@ public class RepoProject implements Comparable<RepoProject> {
/**
* Set the url of the sub repo.
*
- * @param groups
+ * @param groupsParam
* comma separated group list
* @return this for chaining.
* @since 4.4
*/
- public RepoProject setGroups(String groups) {
+ public RepoProject setGroups(String groupsParam) {
this.groups.clear();
- this.groups.addAll(Arrays.asList(groups.split(","))); //$NON-NLS-1$
+ this.groups.addAll(Arrays.asList(groupsParam.split(","))); //$NON-NLS-1$
return this;
}