Re: [PATCH v4 02/11] Support showing notes from more than one notes tree

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

 



Umm, since I'm currently working on another reroll that has pretty
args to add notes refs for display...

On Tuesday 23 February 2010 00:20:06 Junio C Hamano wrote:
> Thomas Rast <trast@xxxxxxxxxxxxxxx> writes:
> > +	if (flags & NOTES_SHOW_HEADER_WITH_REF && t->ref) {
> > +		const char *ref = t->ref;
> > +		if (!strcmp(ref, GIT_NOTES_DEFAULT_REF)) {
> > +			strbuf_addstr(sb, "\nNotes:\n");
> > +		} else {
> > +			if (!prefixcmp(ref, "refs/"))
> > +				ref += 5;
> > +			if (!prefixcmp(ref, "notes/"))
> > +				ref += 6;
> > +			strbuf_addf(sb, "\nNotes (%s):\n", ref);
> > +		}
> > +	} else if (flags & (NOTES_SHOW_HEADER|NOTES_SHOW_HEADER_WITH_REF))
> >  		strbuf_addstr(sb, "\nNotes:\n");
> 
> It is not clear what the distinction between NOTES_SHOW_HEADER and
> NOTES_SHOW_HEADER_WITH_REF.  Does anybody still call this function with
> NOTES_SHOW_HEADER alone without NOTES_SHOW_HEADER_WITH_REF?

No.

> I expected to see "Notes:\n" regardless of the mode if the notes is coming
> from the default refs/notes/commits tree, but it probably is better to say
> "Notes (commits):\n" like your patch does.

I special-cased GIT_NOTES_DEFAULT_REF (which is "refs/notes/commits")
above *at your request* to not change the output in the default case.
So which way do you want it?

-- 
Thomas Rast
trast@{inf,student}.ethz.ch
--
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]