summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2014-07-15 11:32:23 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2014-09-04 11:35:16 +0200
commit2f6372337cfd5944e2179f5ec5e2dbe0cbc96386 (patch)
treee8c61e3ebc4c54b6cfda4f2e4155cd825fa408ec /org.eclipse.jgit/src/org/eclipse
parent547f05d675e27b60a8d5a32e92f8f0e04582bdab (diff)
downloadjgit-2f6372337cfd5944e2179f5ec5e2dbe0cbc96386.tar.gz
jgit-2f6372337cfd5944e2179f5ec5e2dbe0cbc96386.zip
Rename local variables/parameters to remove warnings about hiding
Change-Id: I73f38492b6a2e7fd6e77005efd0a8a8c65763e74
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java18
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java20
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java10
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java6
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java4
8 files changed, 47 insertions, 47 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
index 0488a418af..83026a0627 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/MergeCommand.java
@@ -485,35 +485,35 @@ public class MergeCommand extends GitCommand<MergeResult> {
}
/**
- * @param commit
+ * @param aCommit
* a reference to a commit which is merged with the current head
* @return {@code this}
*/
- public MergeCommand include(Ref commit) {
+ public MergeCommand include(Ref aCommit) {
checkCallable();
- commits.add(commit);
+ commits.add(aCommit);
return this;
}
/**
- * @param commit
+ * @param aCommit
* the Id of a commit which is merged with the current head
* @return {@code this}
*/
- public MergeCommand include(AnyObjectId commit) {
- return include(commit.getName(), commit);
+ public MergeCommand include(AnyObjectId aCommit) {
+ return include(aCommit.getName(), aCommit);
}
/**
* @param name
* a name given to the commit
- * @param commit
+ * @param aCommit
* the Id of a commit which is merged with the current head
* @return {@code this}
*/
- public MergeCommand include(String name, AnyObjectId commit) {
+ public MergeCommand include(String name, AnyObjectId aCommit) {
return include(new ObjectIdRef.Unpeeled(Storage.LOOSE, name,
- commit.copy()));
+ aCommit.copy()));
}
/**
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
index 9ba7410299..7cc682e6b5 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/RebaseCommand.java
@@ -672,15 +672,15 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
FileUtils.delete(currentCommitFile);
}
- private RebaseResult finishRebase(RevCommit newHead,
- boolean lastStepWasForward) throws IOException, GitAPIException {
+ private RebaseResult finishRebase(RevCommit finalHead,
+ boolean lastStepIsForward) throws IOException, GitAPIException {
String headName = rebaseState.readFile(HEAD_NAME);
- updateHead(headName, newHead, upstreamCommit);
+ updateHead(headName, finalHead, upstreamCommit);
boolean stashConflicts = autoStashApply();
FileUtils.delete(rebaseState.getDir(), FileUtils.RECURSIVE);
if (stashConflicts)
return RebaseResult.STASH_APPLY_CONFLICTS_RESULT;
- if (lastStepWasForward || newHead == null)
+ if (lastStepIsForward || finalHead == null)
return RebaseResult.FAST_FORWARD_RESULT;
return RebaseResult.OK_RESULT;
}
@@ -753,7 +753,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
private RevCommit squashIntoPrevious(boolean sequenceContainsSquash,
RebaseTodoLine nextStep)
throws IOException, GitAPIException {
- RevCommit newHead;
+ RevCommit retNewHead;
String commitMessage = rebaseState
.readFile(MESSAGE_SQUASH);
@@ -765,7 +765,7 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
commitMessage = interactiveHandler
.modifyCommitMessage(commitMessage);
}
- newHead = new Git(repo).commit()
+ retNewHead = new Git(repo).commit()
.setMessage(stripCommentLines(commitMessage))
.setAmend(true).call();
rebaseState.getFile(MESSAGE_SQUASH).delete();
@@ -773,11 +773,11 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
} else {
// Next step is either Squash or Fixup
- newHead = new Git(repo).commit()
+ retNewHead = new Git(repo).commit()
.setMessage(commitMessage).setAmend(true)
.call();
}
- return newHead;
+ return retNewHead;
}
private static String stripCommentLines(String commitMessage) {
@@ -862,13 +862,13 @@ public class RebaseCommand extends GitCommand<RebaseResult> {
return ourCommitName;
}
- private void updateHead(String headName, RevCommit newHead, RevCommit onto)
+ private void updateHead(String headName, RevCommit aNewHead, RevCommit onto)
throws IOException {
// point the previous head (if any) to the new commit
if (headName.startsWith(Constants.R_REFS)) {
RefUpdate rup = repo.updateRef(headName);
- rup.setNewObjectId(newHead);
+ rup.setNewObjectId(aNewHead);
rup.setRefLogMessage("rebase finished: " + headName + " onto " //$NON-NLS-1$ //$NON-NLS-2$
+ onto.getName(), false);
Result res = rup.forceUpdate();
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java
index d935857cec..4d54e0be97 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/StashApplyCommand.java
@@ -122,12 +122,12 @@ public class StashApplyCommand extends GitCommand<ObjectId> {
}
/**
- * @param ignoreRepositoryState
+ * @param willIgnoreRepositoryState
* @return {@code this}
* @since 3.2
*/
- public StashApplyCommand ignoreRepositoryState(boolean ignoreRepositoryState) {
- this.ignoreRepositoryState = ignoreRepositoryState;
+ public StashApplyCommand ignoreRepositoryState(boolean willIgnoreRepositoryState) {
+ this.ignoreRepositoryState = willIgnoreRepositoryState;
return this;
}
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 330c7d911b..9d6aeaba12 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/gitrepo/RepoCommand.java
@@ -751,26 +751,26 @@ public class RepoCommand extends GitCommand<RevCommit> {
Config cfg = new Config();
for (Project proj : bareProjects) {
String name = proj.path;
- String uri = proj.name;
+ String nameUri = proj.name;
cfg.setString("submodule", name, "path", name); //$NON-NLS-1$ //$NON-NLS-2$
- cfg.setString("submodule", name, "url", uri); //$NON-NLS-1$ //$NON-NLS-2$
+ cfg.setString("submodule", name, "url", nameUri); //$NON-NLS-1$ //$NON-NLS-2$
// create gitlink
DirCacheEntry dcEntry = new DirCacheEntry(name);
ObjectId objectId;
if (ObjectId.isId(proj.revision))
objectId = ObjectId.fromString(proj.revision);
else {
- objectId = callback.sha1(uri, proj.revision);
+ objectId = callback.sha1(nameUri, proj.revision);
}
if (objectId == null)
- throw new RemoteUnavailableException(uri);
+ throw new RemoteUnavailableException(nameUri);
dcEntry.setObjectId(objectId);
dcEntry.setFileMode(FileMode.GITLINK);
builder.add(dcEntry);
for (CopyFile copyfile : proj.copyfiles) {
byte[] src = callback.readFile(
- uri, proj.revision, copyfile.src);
+ nameUri, proj.revision, copyfile.src);
objectId = inserter.insert(Constants.OBJ_BLOB, src);
dcEntry = new DirCacheEntry(copyfile.dest);
dcEntry.setObjectId(objectId);
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java b/org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java
index 713eb447dc..85cdb76847 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java
@@ -264,17 +264,17 @@ public class RecursiveMerger extends ResolveMerger {
*/
private DirCache dircacheFromTree(ObjectId treeId) throws IOException {
DirCache ret = DirCache.newInCore();
- DirCacheBuilder builder = ret.builder();
- TreeWalk tw = new TreeWalk(reader);
- tw.addTree(treeId);
- tw.setRecursive(true);
- while (tw.next()) {
- DirCacheEntry e = new DirCacheEntry(tw.getRawPath());
- e.setFileMode(tw.getFileMode(0));
- e.setObjectId(tw.getObjectId(0));
- builder.add(e);
+ DirCacheBuilder aBuilder = ret.builder();
+ TreeWalk atw = new TreeWalk(reader);
+ atw.addTree(treeId);
+ atw.setRecursive(true);
+ while (atw.next()) {
+ DirCacheEntry e = new DirCacheEntry(atw.getRawPath());
+ e.setFileMode(atw.getFileMode(0));
+ e.setObjectId(atw.getObjectId(0));
+ aBuilder.add(e);
}
- builder.finish();
+ aBuilder.finish();
return ret;
}
}
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
index 06537905db..cc07b85474 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java
@@ -630,15 +630,15 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
}
class HttpObjectDB extends WalkRemoteObjectDatabase {
- private final URL objectsUrl;
+ private final URL httpObjectsUrl;
HttpObjectDB(final URL b) {
- objectsUrl = b;
+ httpObjectsUrl = b;
}
@Override
URIish getURI() {
- return new URIish(objectsUrl);
+ return new URIish(httpObjectsUrl);
}
@Override
@@ -661,7 +661,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
@Override
WalkRemoteObjectDatabase openAlternate(final String location)
throws IOException {
- return new HttpObjectDB(new URL(objectsUrl, location));
+ return new HttpObjectDB(new URL(httpObjectsUrl, location));
}
@Override
@@ -689,7 +689,7 @@ public class TransportHttp extends HttpTransport implements WalkTransport,
@Override
FileStream open(final String path) throws IOException {
- final URL base = objectsUrl;
+ final URL base = httpObjectsUrl;
final URL u = new URL(base, path);
final HttpConnection c = httpOpen(u);
switch (HttpSupport.response(c)) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java
index 2dd3c3aa14..41e593eaa2 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/treewalk/AbstractTreeIterator.java
@@ -328,13 +328,13 @@ public abstract class AbstractTreeIterator {
* position to start reading the raw buffer.
* @param end
* one past the end of the raw buffer (length is end - pos).
- * @param mode
+ * @param pathMode
* the mode of the path.
* @return -1 if this entry sorts first; 0 if the entries are equal; 1 if
* p's entry sorts first.
*/
- public int pathCompare(byte[] buf, int pos, int end, int mode) {
- return pathCompare(buf, pos, end, mode, 0);
+ public int pathCompare(byte[] buf, int pos, int end, int pathMode) {
+ return pathCompare(buf, pos, end, pathMode, 0);
}
private int pathCompare(byte[] b, int bPos, int bEnd, int bMode, int aPos) {
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java
index 330cac1543..9e5b22180b 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FileUtils.java
@@ -376,8 +376,8 @@ public class FileUtils {
*/
public static File createTempDir(String prefix, String suffix, File dir)
throws IOException {
- final int RETRY = 1; // When something bad happens, retry once.
- for (int i = 0; i < RETRY; i++) {
+ final int RETRIES = 1; // When something bad happens, retry once.
+ for (int i = 0; i < RETRIES; i++) {
File tmp = File.createTempFile(prefix, suffix, dir);
if (!tmp.delete())
continue;