]> source.dussan.org Git - jgit.git/commitdiff
Remove unused getTreeId from TreeFormatter 28/2028/1
authorShawn O. Pearce <spearce@spearce.org>
Fri, 3 Dec 2010 20:47:37 +0000 (12:47 -0800)
committerShawn O. Pearce <spearce@spearce.org>
Fri, 3 Dec 2010 20:47:37 +0000 (12:47 -0800)
Change-Id: If5955757575d4c6053b6f8109e9dc2ecb0502446
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Reviewed-by: Chris Aniszczyk <caniszczyk@gmail.com>
org.eclipse.jgit/src/org/eclipse/jgit/lib/TreeFormatter.java

index e14e81f6e0ff6264fdfc515cdd0b2039f741e005..1b2627e01b13f6cc364bc5e30fcdc4ab290b1616 100644 (file)
@@ -270,25 +270,6 @@ public class TreeFormatter {
                overflowBuffer.write((byte) 0);
        }
 
-       /**
-        * Compute the current tree's ObjectId.
-        *
-        * @return computed ObjectId of the tree
-        */
-       public ObjectId getTreeId() {
-               final ObjectInserter.Formatter fmt = new ObjectInserter.Formatter();
-               if (buf != null)
-                       return fmt.idFor(OBJ_TREE, buf, 0, ptr);
-
-               try {
-                       final long len = overflowBuffer.length();
-                       return fmt.idFor(OBJ_TREE, len, overflowBuffer.openInputStream());
-               } catch (IOException err) {
-                       // This should never happen, its read failure on a byte array.
-                       throw new RuntimeException(err);
-               }
-       }
-
        /**
         * Insert this tree and obtain its ObjectId.
         *