Re: [GSoC RFC PATCH v2 4/7] repo-info: add the --allow-empty flag
- From
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com>
- Date
- Jun 23, 2025, 20:28 UTC
- Message-ID
- <9E8D7078-25B8-4036-8961-A1758C17FBDC@gmail.com>
- In-Reply-To
- <CAOLa=ZTCoc9vfeMrWxqU5psmbxGzW=B-QULeSR+uvF9kQi9WzQ@mail.gmail.com>
Show 12 quoted lines
> I thought the idea was that we would show a subset of the fields by > default when no user input is provided. Which would mean we have the > following: > > * `git repo-info` which would show a subset of all fields, giving > important repository information. > * `git repo-info --all` which would show all available fields. > * `git repo-info <fields>` which would only show the requested fields. > > > This is also a good time to think about if we should make the default to > not show anything as Junio mentioned.
After this review, I'm starting to think that leaving it empty by default would be better. Specially after the review by Phillip Wood [1], who has a good argument for it:
""" As this is a plumbing command I think it would be clearer if the caller was required to specify the output format and the information that they require with an "--all" option for "show me everything" as Junio suggested. If we were to set defaults for the format and keys now we would be stuck with them forever. """
[1] https://lore.kernel.org/git/af27af92-73d5-4f0a-84f4-9c91de6ab6e6@gmail.com/