diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2010-07-28 14:45:12 -0700 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2010-08-04 11:00:07 -0700 |
commit | 60c5939b236723cb43344115eed03caf8de2b22a (patch) | |
tree | 43071e9ebc5955e697fadd1b8d4da0c13824c3d9 /org.eclipse.jgit.pgm | |
parent | 7514a6dbdc1c69a885d900385d0d9f5b40224c2f (diff) | |
download | jgit-60c5939b236723cb43344115eed03caf8de2b22a.tar.gz jgit-60c5939b236723cb43344115eed03caf8de2b22a.zip |
Rename getOldName,getNewName to getOldPath,getNewPath
TreeWalk calls this value "path", while "name" is the stuff after the
last slash. FileHeader should do the same thing to be consistent.
Rename getOldName to getOldPath and getNewName to getNewPath.
Bug: 318526
Change-Id: Ib2e372ad4426402d37939b48d8f233154cc637da
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'org.eclipse.jgit.pgm')
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java | 10 | ||||
-rw-r--r-- | org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java index 77ed73048d..ebdb74f3c7 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Diff.java @@ -153,22 +153,22 @@ class Diff extends TextBuiltin { for (DiffEntry ent : files) { switch (ent.getChangeType()) { case ADD: - out.println("A\t" + ent.getNewName()); + out.println("A\t" + ent.getNewPath()); break; case DELETE: - out.println("D\t" + ent.getOldName()); + out.println("D\t" + ent.getOldPath()); break; case MODIFY: - out.println("M\t" + ent.getNewName()); + out.println("M\t" + ent.getNewPath()); break; case COPY: out.format("C%1$03d\t%2$s\t%3$s", ent.getScore(), // - ent.getOldName(), ent.getNewName()); + ent.getOldPath(), ent.getNewPath()); out.println(); break; case RENAME: out.format("R%1$03d\t%2$s\t%3$s", ent.getScore(), // - ent.getOldName(), ent.getNewName()); + ent.getOldPath(), ent.getNewPath()); out.println(); break; } diff --git a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java index 48a05915e4..fbc019fa24 100644 --- a/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java +++ b/org.eclipse.jgit.pgm/src/org/eclipse/jgit/pgm/Log.java @@ -242,7 +242,7 @@ class Log extends RevWalkTextBuiltin { String oldPath = ((FollowFilter) pathFilter).getPath(); for (DiffEntry ent : files) { if (ent.getChangeType() == ChangeType.ADD - && ent.getNewName().equals(oldPath)) + && ent.getNewPath().equals(oldPath)) return true; } return false; @@ -251,8 +251,8 @@ class Log extends RevWalkTextBuiltin { private List<DiffEntry> updateFollowFilter(List<DiffEntry> files) { String oldPath = ((FollowFilter) pathFilter).getPath(); for (DiffEntry ent : files) { - if (isRename(ent) && ent.getNewName().equals(oldPath)) { - pathFilter = FollowFilter.create(ent.getOldName()); + if (isRename(ent) && ent.getNewPath().equals(oldPath)) { + pathFilter = FollowFilter.create(ent.getOldPath()); return Collections.singletonList(ent); } } |