Re: [PATCH v2 2/5] commit-graph: collapse parameters into flags
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Apr 25, 2019, 05:21 UTC
- Message-ID
- <xmqqk1fiy80k.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <04f5df11351ec117a3a019c9186df38c19151d16.1556135881.git.gitgitgadget@gmail.com>
"Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 9 quoted lines
> From: Derrick Stolee <dstolee@microsoft.com> > > The write_commit_graph() and write_commit_graph_reachable() methods > currently take two boolean parameters: 'append' and 'report_progress'. > We will soon expand the possible options to send to these methods, so > instead of complicating the parameter list, first simplify it. > > Collapse these parameters into a 'flags' parameter, and adjust the > callers to provide flags as necessary.
Nice. It would make more sense for a collection of independent bits to be in an unsigned, not signed integer variable, though. Unless you assign some special meaning to the top-most bit, that is.