Re: [PATCH] rev-list: make empty --stdin not an error
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 22, 2018, 21:41 UTC
- Message-ID
- <xmqqva82krjs.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <xmqqa7pem8ul.fsf@gitster-ct.c.googlers.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 5 quoted lines
> I think this makes sense, but if we were to give a dedicated field > in the revs structure, can we lose the local variable at the same > time, I wonder? > > Thanks.
Well, the answer to "can we" is always "yes"; what I was truly wondering was if it makes sense to do so. I am on the fence.
Show 12 quoted lines
>
>> diff --git a/revision.c b/revision.c
>> index de4dce600d..4d53102cf4 100644
>> --- a/revision.c
>> +++ b/revision.c
>> @@ -2369,6 +2369,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, struct s
>> }
>> if (read_from_stdin++)
>> die("--stdin given twice?");
>> + revs->read_from_stdin = 1;
>> read_revisions_from_stdin(revs, &prune_data);
>> continue;