Re: [PATCH v2 1/5] commit-graph: define common usage with a macro
- From
Taylor Blau <me@ttaylorr.com>
- Date
- Jul 19, 2021, 16:29 UTC
- Message-ID
- <YPWoTKIWRbg6tGrS@nand.local>
- In-Reply-To
- <patch-1.5-0b0bb04ecf5-20210718T074936Z-avarab@gmail.com>
On Sun, Jul 18, 2021 at 09:58:05AM +0200, Ævar Arnfjörð Bjarmason wrote:
Show 8 quoted lines
> Share the usage message between these three variables by using a > macro. Before this new options needed to copy/paste the usage > information, see e.g. 809e0327f5 (builtin/commit-graph.c: introduce > '--max-new-filters=<n>', 2020-09-18). > > See b25b727494f (builtin/multi-pack-index.c: define common usage with > a macro, 2021-03-30) for another use of this pattern (but on-list this > one came first).
I don't have a strong opinion, but I believe Jonathan Tan suggested that we move the #define's out-of-line with their variable declarations back in [1].
I think that what you wrote here is fine, but I tend to agree with Jonathan that the version we ended up with in the tree is cleaner and a little easier to read (albeit a few more lines).
[1]: https://lore.kernel.org/git/20210302040625.4035284-1-jonathantanmy@google.com/
Thanks, Taylor