Re: [PATCH EGIT 1/2] Implement "jgit rev-parse"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Daniel Cheng (aka SDiZ)" <j16sdiz+freenet@xxxxxxxxx> 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<ObjectId> commits = new ArrayList<ObjectId>();
> +
> +	@Override
> +	protected void run() throws Exception {
> +		if (all) {
> +			Map<String, Ref> 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.
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]