From: Shawn O. Pearce Date: Fri, 01 May 2009 15:14:54 GMT Subject: Re: [PATCH EGIT 1/2] Implement "jgit rev-parse" Message-ID: <20090501151454.GC23604@spearce.org> In-Reply-To: <1241174172-19581-1-git-send-email-git@sdiz.net> "Daniel Cheng (aka SDiZ)" wrote: > .../src/org/spearce/jgit/pgm/RevParse.java | 70 ++++++++++++++++++++ Thanks. I have two remarks, I'm amending them in as they are trivial for me to fix. > +class RevParse extends TextBuiltin { > + RevWalk walk; Unused field. Deleted. > + @Option(name = "--all") > + boolean all = false; > + > + @Argument(index = 0, metaVar = "commit-ish") > + private final List commits = new ArrayList(); > + > + @Override > + protected void run() throws Exception { > + if (all) { > + Map allRefs = db.getAllRefs(); > + for (final Ref r : allRefs.values()) > + System.out.println(r.getObjectId().name()); > + } else { > + for (final ObjectId o : commits) > + System.out.println(o.name()); These should use the PrintWriter called "out" inherited from the TextBuiltin class, not System.out. Fixed. -- Shawn.