Re: [PATCH 2/3] convert "enum date_mode" into a struct
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 7, 2015, 21:19 UTC
- Message-ID
- <xmqqzj371x9s.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <20150707211304.GA16683@peff.net>
Jeff King <peff@peff.net> writes:
> OK. Do you want to leave it be, then, or would you prefer me to do the > NULL fallback? Or we could bump the enum to start with 1, and then > explicitly treat "0" as a synonym for DATE_NORMAL (in case it comes in > through a memset or similar).
I didn't think about the memset() initialization, and keeping the normal case to be 0 makes tons of sense.
I'd prefer to see the stale code dump core rather than leaving it stale without anybody noticing. Hopefully the date-mode change can hit 'master' fairly soon after the upcoming release, so unless a fix that involves show_date() need to be written and applied to 2.4 codebase and upwards at the same time, I do not think it is a huge issue.
Thanks.