{"thread":{"id":"17559","subject":"[JGIT PATCH] Clarify that TreeWalk trees must all have the same root","startedAt":"2009-02-04T15:48:05Z","lastAt":"2009-02-04T15:48:05Z","messageCount":1,"participants":["Tor Arne Vestbø"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"103156","messageId":"1233762485-1520-1-git-send-email-torarnv@gmail.com","threadId":"17559","inReplyTo":null,"subject":"[JGIT PATCH] Clarify that TreeWalk trees must all have the same root","fromName":"Tor Arne Vestbø","fromEmail":"torarnv@gmail.com","sentAt":"2009-02-04T15:48:05Z","receivedAt":"2009-02-04T15:48:05Z","isPatch":true,"sender":{"key":"torarnv@gmail.com","avatar":"https://gravatar.com/avatar/847af0150a5a28ad86d9db1556a48aba04e7642c6a29a5a767f8c2bdf1720321?d=mp&s=160"},"body":"Signed-off-by: Tor Arne Vestbø <torarnv@gmail.com>\n---\n .../src/org/spearce/jgit/treewalk/TreeWalk.java    |   12 +++++++++++-\n 1 files changed, 11 insertions(+), 1 deletions(-)\n\ndiff --git a/org.spearce.jgit/src/org/spearce/jgit/treewalk/TreeWalk.java b/org.spearce.jgit/src/org/spearce/jgit/treewalk/TreeWalk.java\nindex cbecb05..189fc86 100644\n--- a/org.spearce.jgit/src/org/spearce/jgit/treewalk/TreeWalk.java\n+++ b/org.spearce.jgit/src/org/spearce/jgit/treewalk/TreeWalk.java\n@@ -61,6 +61,8 @@\n  * <p>\n  * This class can perform n-way differences across as many trees as necessary.\n  * <p>\n+ * Each tree added must have the same root as existing trees in the walk.\n+ * <p>\n  * A TreeWalk instance can only be used once to generate results. Running a\n  * second time requires creating a new TreeWalk instance, or invoking\n  * {@link #reset()} and adding new trees before starting again. Resetting an\n@@ -87,7 +89,7 @@\n \t * @param path\n \t *            single path to advance the tree walk instance into.\n \t * @param trees\n-\t *            one or more trees to walk through.\n+\t *            one or more trees to walk through, all with the same root.\n \t * @return a new tree walk configured for exactly this one path; null if no\n \t *         path was found in any of the trees.\n \t * @throws IOException\n@@ -377,6 +379,8 @@ public void reset(final AnyObjectId[] ids) throws MissingObjectException,\n \t * <p>\n \t * The position of this tree is returned to the caller, in case the caller\n \t * has lost track of the order they added the trees into the walker.\n+\t * <p>\n+\t * The tree must have the same root as existing trees in the walk.\n \t * \n \t * @param id\n \t *            identity of the tree object the caller wants walked.\n@@ -403,10 +407,16 @@ public int addTree(final ObjectId id) throws MissingObjectException,\n \t * <p>\n \t * The position of this tree is returned to the caller, in case the caller\n \t * has lost track of the order they added the trees into the walker.\n+\t * <p>\n+\t * The tree which the iterator operates on must have the same root as\n+\t * existing trees in the walk.\n \t * \n \t * @param p\n \t *            an iterator to walk over. The iterator should be new, with no\n \t *            parent, and should still be positioned before the first entry.\n+\t *            The tree which the iterator operates on must have the same root\n+\t *            as other trees in the walk.\n+\t *\n \t * @return position of this tree within the walker.\n \t * @throws CorruptObjectException\n \t *             the iterator was unable to obtain its first entry, due to\n-- \n1.6.1.2.309.g2ea3\n"}]}