]> source.dussan.org Git - jgit.git/commit
Add a NameRevCommand for describing IDs in terms of refnames 45/10945/5
authorDave Borowitz <dborowitz@google.com>
Thu, 7 Mar 2013 17:41:05 +0000 (09:41 -0800)
committerDave Borowitz <dborowitz@google.com>
Mon, 11 Mar 2013 19:47:28 +0000 (12:47 -0700)
commit30ba407a9a8983fd7aaed73d8baa70469dee0689
treee04a86a5daf0fa11f9f6b25f9cfaf51d52959b2e
parent13ea3b0957d1621c1aea986a97f8d2ec0b37491a
Add a NameRevCommand for describing IDs in terms of refnames

The walk logic does not use RevWalk because it needs to walk all paths
to each of the requested commits, keeping track of each path along which
the commit was found in the RevCommit subclass. From these paths, a
single "best" path is chosen based on the total path length, with a
penalty applied for paths that traverse merges.

This functionality parallels "git name-rev".

Change-Id: I92bfb47dd16c898313d2ee525395609c3bf72ebe
org.eclipse.jgit.test/tst/org/eclipse/jgit/api/NameRevCommandTest.java [new file with mode: 0644]
org.eclipse.jgit/src/org/eclipse/jgit/api/Git.java
org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java [new file with mode: 0644]