Re: [PATCH v1 4/8] commit: move print_commit_summary() to libgit
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Nov 7, 2017, 03:38 UTC
- Message-ID
- <xmqqlgjig3lv.fsf@gitster.mtv.corp.google.com>
- In-Reply-To
- <20171106112709.2121-5-phillip.wood@talktalk.net>
Phillip Wood <phillip.wood@talktalk.net> writes:
Show 7 quoted lines
> From: Phillip Wood <phillip.wood@dunelm.org.uk> > > Move print_commit_summary() from builtin/commit.c to sequencer.c so it > can be shared with other commands. The function is modified by > changing the last argument to a flag so callers can specify whether > they want to show the author date in addition to specifying if this is > an initial commit.
A movement of a long function like this one really is easier if you did not make any other unnecessary change in the same patch and then made the change as a follow-up.
The end result seemed sane.
Do not use signed int as a collection of bits "flags", as it makes readers wonder if you are going to do some clever thing by treating the topmost bit somewhat special (e.g. "if (flags < 0)"). Unless you are indeed doing something clever like that, use "unsigned int" instead.