aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org
diff options
context:
space:
mode:
authorShawn Pearce <spearce@spearce.org>2014-04-17 14:19:23 -0700
committerShawn Pearce <spearce@spearce.org>2014-04-17 15:51:50 -0700
commit5a4e34009be6ab108d3165a436da38cb23fb8a0f (patch)
treef87a9279b783ac0ac70b822d7b0c7c312bd61f33 /org.eclipse.jgit/src/org
parent551f3a0fa5460513008e26bd2bb1ac73c185f5f5 (diff)
downloadjgit-5a4e34009be6ab108d3165a436da38cb23fb8a0f.tar.gz
jgit-5a4e34009be6ab108d3165a436da38cb23fb8a0f.zip
blame: Automatically increase commit abbreviation length
Ensure commit object names are unique by extending the default abbreviation as long as necessary. This allows `jgit blame` to more closely match the formatted output of `git blame` on large histories like Gerrit Code Review's ReceiveCommits.java file. Change-Id: I5f7c4855769ee9dcba973389df9e109005dcdb5b
Diffstat (limited to 'org.eclipse.jgit/src/org')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
index c198385e85..63d0fb2cfb 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/blame/BlameGenerator.java
@@ -423,6 +423,18 @@ public class BlameGenerator {
}
/**
+ * Allocate a new RevFlag for use by the caller.
+ *
+ * @param name
+ * unique name of the flag in the blame context.
+ * @return the newly allocated flag.
+ * @since 3.4
+ */
+ public RevFlag newFlag(String name) {
+ return revPool.newFlag(name);
+ }
+
+ /**
* Execute the generator in a blocking fashion until all data is ready.
*
* @return the complete result. Null if no file exists for the given path.