Re: [PATCH] Initialize notes trees if %N is used and no --show-notes given

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Thomas Rast
Date: Tuesday, April 6, 2010 - 2:27 am

[A Cc would have been nice, I nearly missed this but it's clearly my
bug.]

Johannes Gilger wrote:
[...]

Thanks for the report.  Unfortunately this returns to the
silently-initialize-with-NULL case that was I explicitly asked to
avoid.

I see three options:
- %N could simply expand to nothing if notes are disabled
- %N could silently initialize as above
- your patch

though for your patch, I'd also remove the assert() since it's
basically there to enforce the requirement of initializing them; the
trees list can never be NULL after init_display_notes().

Currently I think the first option would be the best, since
(notionally; we still don't have all the bits AFAIK) the built-in
formats can then be written with a %N at the right place, without
having to worry about the other command line options.  I haven't had
enough coffee to think about any possible ill side effects, though.


-- 
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] Initialize notes trees if %N is used and no -- ..., Thomas Rast, (Tue Apr 6, 2:27 am)
[PATCH] pretty.c: Don't expand %N without --show-notes, Johannes Gilger, (Sat Apr 10, 12:05 am)
Re: [PATCH] pretty.c: Don't expand %N without --show-notes, Junio C Hamano, (Sat Apr 10, 1:00 pm)
[PATCH] Notes: Connect the %N flag to --{show,no}-notes, Johannes Gilger, (Sat Apr 10, 2:30 pm)
Re: [PATCH] Notes: Connect the %N flag to --{show,no}-notes, Johannes Gilger, (Sat Apr 10, 3:20 pm)
[PATCH] pretty: Initialize notes if %N is used, Johannes Gilger, (Sun Apr 11, 7:54 am)
Re: [PATCH] pretty: Initialize notes if %N is used, Jeff King, (Mon Apr 12, 1:56 am)
[PATCHv2] pretty: Initialize notes if %N is used, Johannes Gilger, (Tue Apr 13, 1:59 am)
Re: [PATCHv2] pretty: Initialize notes if %N is used, Johannes Gilger, (Tue Apr 13, 3:36 am)
[PATCHv3] pretty: Initialize notes if %N is used, Johannes Gilger, (Tue Apr 13, 4:01 am)
[PATCHv4] pretty: Initialize notes if %N is used, Johannes Gilger, (Tue Apr 13, 4:26 am)
Re: [PATCHv4] pretty: Initialize notes if %N is used, Junio C Hamano, (Tue Apr 13, 1:01 pm)
[PATCHv5] pretty: Initialize notes if %N is used, Johannes Gilger, (Tue Apr 13, 1:31 pm)