Re: [PATCH v3] blame: print unblamable and ignored commits in porcelain mode
- From
- Phillip Wood <phillip.wood123@gmail.com>
- Date
- Mar 30, 2025, 09:28 UTC
- Message-ID
- <be0ca59b-2daa-4089-8948-d04fcdc3bfa7@gmail.com>
- In-Reply-To
- <xmqqecyfazg2.fsf@gitster.g>
On 30/03/2025 05:56, Junio C Hamano wrote:
Show 12 quoted lines
> Karthik Nayak <karthik.188@gmail.com> writes:
>
>> +static void emit_porcelain_per_line_details(struct blame_entry *ent)
>> +{
>> + if (mark_unblamable_lines && ent->unblamable)
>> + puts("unblamable\n");
>> + if (mark_ignored_lines && ent->ignored)
>> + puts("ignored\n");
>> +}
>
> Doesn't puts(3), unlike fputs(3), add its own trailing newline to
> stdout?Indeed. Perhaps the regression test would be more effective if it used test_cmp rather than
test $(grep ^ignored actual | wc -l) -eq 2
which misses this bug and gives no output if it fails.
Best Wishes
Phillip