git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v2] convert: legitimately disable clean/smudge filter with an empty override

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 29, 2016, 18:48 UTC
Message-ID
<xmqqwpqsi5m0.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<xmqqh9hwjlha.fsf@gitster.mtv.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
> Instead, teach apply_filter() to treat an empty string given as a
> filter means the input must be returned as-is without conversion,
> and the operation must always succeed.
Ugh, that was a non-sentence.  
  Instead, teach apply_filter() to treat an empty string as a no-op
  filter that always returns successfully its input as-is without
  conversion.
was what I meant to say.
Show 29 quoted lines
> -- >8 --
>
>>  
>>  	if (!dst)
>> diff --git a/t/t0021-conversion.sh b/t/t0021-conversion.sh
>> index 718efa0..7bac2bc 100755
>> --- a/t/t0021-conversion.sh
>> +++ b/t/t0021-conversion.sh
>> @@ -252,4 +252,20 @@ test_expect_success "filter: smudge empty file" '
>>  	test_cmp expected filtered-empty-in-repo
>>  '
>>  
>> +test_expect_success 'disable filter with empty override' '
>> +	test_config_global filter.disable.smudge false &&
>> +	test_config_global filter.disable.clean false &&
>> +	test_config filter.disable.smudge false &&
>> +	test_config filter.disable.clean false &&
>> +
>> +	echo "*.disable filter=disable" >.gitattributes &&
>> +
>> +	echo test >test.disable &&
>> +	git -c filter.disable.clean= add test.disable 2>err &&
>> +	test_must_be_empty err &&
>> +	rm -f test.disable &&
>> +	git -c filter.disable.smudge= checkout -- test.disable 2>err &&
>> +	test_must_be_empty err
>> +'
>> +
>>  test_done
Previous: Junio C HamanoNext: Lars Schneider
Message 4 of 5 in “convert: legitimately disable clean/smudge filter with an empty override”
  1. convert: legitimately disable clean/smudge filter with an empty overridelarsxschneider@gmail.com, Jan 29, 2016
  2. convert: legitimately disable clean/smudge filter with an empty overridelarsxschneider@gmail.com, Jan 29, 2016
  3. Junio C HamanoJan 29, 2016
  4. Junio C HamanoJan 29, 2016
  5. Lars SchneiderJan 29, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.