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

Re: [PATCH] send-email: fix a "first config key wins" regression in v2.33.0

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Sep 7, 2021, 09:15 UTC
Message-ID
<87mtoon3tc.fsf@evledraar.gmail.com>
In-Reply-To
<ce194f13-2b1f-fb21-e224-80190f3b2fd6@gmail.com>
On Mon, Sep 06 2021, Bagas Sanjaya wrote:
Show 18 quoted lines
> On 06/09/21 14.33, Ævar Arnfjörð Bjarmason wrote:
>> +test_expect_success $PREREQ 'sendemail.8bitEncoding in .git/config overrides --global .gitconfig' '
>> +	clean_fake_sendmail &&
>> +	git config sendemail.assume8bitEncoding UTF-8 &&
>> +	test_when_finished "rm -rf home" &&
>> +	mkdir home &&
>> +	git config -f home/.gitconfig sendemail.assume8bitEncoding "bogus too" &&
>> +	echo bogus |
>> +	env HOME="$(pwd)/home" DEBUG=1 \
>> +	git send-email --from=author@example.com --to=nobody@example.com \
>> +			--smtp-server="$(pwd)/fake.sendmail" \
>> +			email-using-8bit >stdout &&
>> +	egrep "Content|MIME" msgtxt1 >actual &&
>> +	test_cmp content-type-decl actual
>> +'
>> +
>
> Did you mean overrides global .gitconfig (s/--global/global/)?

I mean config set with the equivalent of "git config --global", but yeah this is probably an awkward way to phrase that.

> Anyway, compiled and tested successfully (test suite passed).
>
> Tested-by: Bagas Sanjaya <bagasdotme@gmail.com>

Thanks, FWIW the test suite passing doesn't mean much in this case, the only test that stresses this is the above. The issue being that the regression wasn't caught by any existing test...

Previous: Bagas Sanjaya
Message 7 of 7 in “Regression in git send-email parsing sendemail.* config values”
  1. Eli SchwartzSep 5, 2021
  2. Ævar Arnfjörð BjarmasonSep 6, 2021
  3. Eli SchwartzSep 6, 2021
  4. send-email: fix a "first config key wins" regression in v2.33.0Ævar Arnfjörð Bjarmason, Sep 6, 2021
  5. Carlo ArenasSep 6, 2021
  6. Bagas SanjayaSep 6, 2021
  7. Ævar Arnfjörð BjarmasonSep 7, 2021

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.