Re: [GSoC RFC PATCH v2 4/7] repo-info: add the --allow-empty flag
- From
Karthik Nayak <karthik.188@gmail.com>
- Date
- Jun 20, 2025, 09:54 UTC
- Message-ID
- <CAOLa=ZQXeQX-v2JmKTpaJDLwWWKQSXoMUGbpmD6xx8KpbY91yw@mail.gmail.com>
- In-Reply-To
- <20250619225751.99699-5-lucasseikioshiro@gmail.com>
Lucas Seiki Oshiro <lucasseikioshiro@gmail.com> writes:
> Add a flag --allow-empty, which will force the output data to be empty > when no field is requested. >
While you did reply to my previous question about this flag. This patch doesn't sell the need for it in anyway.
So we need: 1. More description in the commit messages about why we need this flag and how it is useful. 2. Documentation around the same.
I still think this is early for this, and we should add this flag later if the need arises.
[snip]
Show 18 quoted lines
> diff --git a/t/t1900-repo-info.sh b/t/t1900-repo-info.sh > index 998c835795..db4a6aad17 100755 > --- a/t/t1900-repo-info.sh > +++ b/t/t1900-repo-info.sh > @@ -15,11 +15,12 @@ test_lazy_prereq PERLJSON ' > ' > > test_expect_success PERLJSON 'json: returns empty output with allow-empty' ' > - git repo-info --format=json >output && > + git repo-info --allow-empty --format=json >output && > test_line_count = 2 output > ' > + > test_expect_success 'plaintext: returns empty output with allow-empty' ' > - git repo-info --format=plaintext >output && > + git repo-info --allow-empty --format=plaintext >output && > test_line_count = 0 output > '
The earlier patches reference allow-empty without really talking about it. Which feels odd and misplaced.