Re: [PATCH 3/3] log and rev-list: add --graph option

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

 



On Mon, May 05, 2008 at 11:41:58PM -0700, Junio C Hamano wrote:
> Adam Simpkins <adam@xxxxxxxxxxxxxxxx> writes:
> 
> > diff --git a/builtin-rev-list.c b/builtin-rev-list.c
> > index 476a870..f868290 100644
> > --- a/builtin-rev-list.c
> > +++ b/builtin-rev-list.c
> > ...
> > @@ -96,9 +98,50 @@ static void show_commit(struct commit *commit)
> >  		pretty_print_commit(revs.commit_format, commit,
> >  				    &buf, revs.abbrev, NULL, NULL,
> >  				    revs.date_mode, 0);
> > -		if (buf.len)
> > -			printf("%s%c", buf.buf, hdr_termination);
> > +		if (revs.graph) {
> > ...
> > +		} else {
> > +			if (buf.len) {
> > +				fwrite(buf.buf, sizeof(char), buf.len, stdout);
> > +				putchar('\n');
> 
> Now hdr_termination can never be NUL, iow you broke "rev-list -v -z"?

Whoops.  Sorry about that.  I didn't notice the "-v" option.

(BTW, I don't think the "-z" option comes into play here.  Just
"rev-list -v" by itself results in a NUL character after each entry
instead of a newline.)

> I'll squash in a minimum fix, because otherwise this breaks existing
> tests.

Thanks!

-- 
Adam Simpkins
adam@xxxxxxxxxxxxxxxx
--
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]

  Powered by Linux