git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robin Rosenberg <robin.rosenberg@dewire.com>
To: git@vger.kernel.org
Cc: "Shawn O. Pearce" <spearce@spearce.org>,
	Marek Zawirski <marek.zawirski@gmail.com>,
	Florian Koeberle <florianskarten@web.de>,
	Robin Rosenberg <robin.rosenberg@dewire.com>
Subject: [JGIT PATCH 1/4] LsTree: Do not use the default first empty tree in the walker
Date: Tue, 24 Jun 2008 23:36:29 +0200	[thread overview]
Message-ID: <1214343392-5341-2-git-send-email-robin.rosenberg@dewire.com> (raw)
In-Reply-To: <1214343392-5341-1-git-send-email-robin.rosenberg@dewire.com>

In f0ef5e1ef09d346432fead17bc82d78b7cfbd621 an empty tree
was added to all TreeWalkers.

Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com>
---
 .../src/org/spearce/jgit/pgm/LsTree.java           |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/pgm/LsTree.java b/org.spearce.jgit/src/org/spearce/jgit/pgm/LsTree.java
index 1bc7bbd..05ec8c3 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/pgm/LsTree.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/pgm/LsTree.java
@@ -65,6 +65,7 @@ class LsTree extends TextBuiltin {
 		else if (argi + 1 < args.length)
 			throw die("too many arguments");
 
+		walk.reset(); // drop the first empty tree, which we do not need here
 		final String n = args[argi];
 		if (is_WorkDir(n))
 			walk.addTree(new FileTreeIterator(new File(n)));
-- 
1.5.5.1.178.g1f811

  reply	other threads:[~2008-06-24 22:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20080622233525.GJ11793@spearce.org>
2008-06-24 21:20 ` [JGIT PATCH 1/4] LsTree: Do not use the default first empty tree in the walker Robin Rosenberg
2008-06-24 21:20   ` [JGIT PATCH 2/4] Create a fnmatch-style pattern TreeFilter Robin Rosenberg
2008-06-24 21:20     ` [JGIT PATCH 3/4] Added a method to get the non-relative name from the tree walker Robin Rosenberg
2008-06-24 21:20       ` [JGIT PATCH 4/4] LsTree: Enable pattern matching in LsTree Robin Rosenberg
2008-06-24 21:36 ` oops, resend Robin Rosenberg
2008-06-24 21:36   ` Robin Rosenberg [this message]
2008-06-24 21:36     ` [JGIT PATCH 2/4] Create a fnmatch-style pattern TreeFilter Robin Rosenberg
2008-06-24 21:36       ` [JGIT PATCH 3/4] Added a method to get the non-relative name from the tree walker Robin Rosenberg
2008-06-24 21:36         ` [JGIT PATCH 4/4] LsTree: Enable pattern matching in LsTree Robin Rosenberg
2008-06-25  4:09           ` Shawn O. Pearce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1214343392-5341-2-git-send-email-robin.rosenberg@dewire.com \
    --to=robin.rosenberg@dewire.com \
    --cc=florianskarten@web.de \
    --cc=git@vger.kernel.org \
    --cc=marek.zawirski@gmail.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).