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

Re: [PATCH v3 1/3] [Outreachy] t3903-stash: test without configured user name

From
SDSlavica Djukic <slavicadj.ip2018@gmail.com>
Date
Oct 30, 2018, 13:04 UTC
Message-ID
<0e361938-29d7-6013-9632-a14d0cb02824@gmail.com>
In-Reply-To
<xmqqa7n1fr2c.fsf@gitster-ct.c.googlers.com>
On 26-Oct-18 3:13 AM, Junio C Hamano wrote:
Show 38 quoted lines
> Slavica Djukic <slavicadj.ip2018@gmail.com> writes:
>
>> From: Slavica <slawica92@hotmail.com>
> Please make sure this matches your sign-off below.
>
>> This is part of enhancement request that ask for 'git stash' to work
>> even if 'user.name' and 'user.email' are not configured.
>> Due to an implementation detail, git-stash undesirably requires
>> 'user.name' and 'user.email' to be set, but shouldn't.
>> The issue is discussed here:
>> https://public-inbox.org/git/87o9debty4.fsf@evledraar.gmail.com/T/#u.
> As the four lines above summarize the issue being highlighted by the
> expect-failure rather well, the last two lines are unnecessary.
> Please remove them.  Alternatively, you can place them after the
> three-dash lines we see below.
>
>> Signed-off-by: Slavica Djukic <slawica92@hotmail.com>
>> ---
>>   t/t3903-stash.sh | 14 ++++++++++++++
>>   1 file changed, 14 insertions(+)
>>
>> diff --git a/t/t3903-stash.sh b/t/t3903-stash.sh
>> index 9e06494ba0..ae2c905343 100755
>> --- a/t/t3903-stash.sh
>> +++ b/t/t3903-stash.sh
>> @@ -1156,4 +1156,18 @@ test_expect_success 'stash -- <subdir> works with binary files' '
>>   	test_path_is_file subdir/untracked
>>   '
>>   
>> +test_expect_failure 'stash works when user.name and user.email are not set' '
>> +    test_commit 1 &&
> Just being curious, but do we need a fresh commit created at this
> point in the test?  Many tests before this one begin with "git reset"
> and then run "git stash" without ever creating commit themselves,
> instead relying on the fact that there already is at least one
> commit created in the "setup" phase of the test that a "stash"
> created can be made relative to.  I do not think this test is all
> that special in that regard to require its own commit.

No, we don't need fresh commit here. Thank you for this and all other suggestions.

I've changed test according to them.
Show 21 quoted lines
>
>> +    test_config user.useconfigonly true &&
>> +    test_config stash.usebuiltin true &&
>> +    sane_unset GIT_AUTHOR_NAME &&
>> +    sane_unset GIT_AUTHOR_EMAIL &&
>> +    sane_unset GIT_COMMITTER_NAME &&
>> +    sane_unset GIT_COMMITTER_EMAIL &&
>> +    test_unconfig user.email &&
> There are trailing whitespaces on the line above.  Please remove.
>
> Also, Don't be original in the form alone---all other tests in this
> file indent with a leading HT, not four SPs.  Please match the style
> of surrounding code.
>
>> +    test_unconfig user.name &&
>> +    echo changed >1.t &&
>> +    git stash
>> +'
>> +
>>   test_done
> Thanks.  Please do not reroll the next round at too rapid a pace.

I've taken my time for next round, I am working on 2/3 and 3/3 parts as well. I wouldn't have sent this patch if I understood you well in previous reply.

Thank you,
Slavica.
>
>
>
Previous: Junio C HamanoNext: Slavica Djukic
Message 18 of 41 in “[Outreachy] t3903-stash: test without configured user name”
  1. 1/3 [Outreachy] t3903-stash: test without configured user nameSlavica, Oct 23, 2018
  2. Christian CouderOct 23, 2018
  3. SlavicaOct 24, 2018
  4. Junio C HamanoOct 25, 2018
  5. Eric SunshineOct 23, 2018
  6. Junio C HamanoOct 24, 2018
  7. Johannes SchindelinOct 24, 2018
  8. Junio C HamanoOct 24, 2018
  9. Johannes SchindelinOct 24, 2018
  10. Junio C HamanoOct 25, 2018
  11. 1/3 [Outreachy] t3903-stash: test without configured user nameSlavica Djukic, Oct 24, 2018
  12. 1/3 [Outreachy] t3903-stash: test without configured user nameSlavica Djukic, Oct 24, 2018
  13. Eric SunshineOct 24, 2018
  14. Junio C HamanoOct 25, 2018
  15. 1/3 [Outreachy] t3903-stash: test without configured user nameSlavica Djukic, Oct 25, 2018
  16. 1/3 [Outreachy] t3903-stash: test without configured user nameSlavica Djukic, Oct 25, 2018
  17. Junio C HamanoOct 26, 2018
  18. Slavica DjukicOct 30, 2018
  19. 0/3 [Outreachy] make stash work if user.name and user.email are not configuredSlavica Djukic, Nov 1, 2018
  20. 1/3 [Outreachy] t3903-stash: test without configured user.name and user.emailSlavica Djukic, Nov 1, 2018
  21. Christian CouderNov 1, 2018
  22. 3/3 stash: tolerate missing user identityJunio C Hamano, Nov 2, 2018
  23. 2/3 [Outreachy] ident: introduce set_fallback_ident() functionSlavica Djukic, Nov 1, 2018
  24. Junio C HamanoNov 2, 2018
  25. Junio C HamanoNov 2, 2018
  26. Junio C HamanoNov 2, 2018
  27. 3/3 [Outreachy] stash: use set_fallback_ident() functionSlavica Djukic, Nov 1, 2018
  28. 0/2 [Outreachy] make stash work if user.name and user.email are not configuredSlavica Djukic, Nov 14, 2018
  29. 1/2 [Outreachy] t3903-stash: test without configured user.name and user.emailSlavica Djukic, Nov 14, 2018
  30. Johannes SchindelinNov 15, 2018
  31. Junio C HamanoNov 16, 2018
  32. Junio C HamanoNov 16, 2018
  33. Junio C HamanoNov 16, 2018
  34. Slavica DjukicNov 16, 2018
  35. Junio C HamanoNov 16, 2018
  36. Slavica DjukicNov 17, 2018
  37. Junio C HamanoNov 18, 2018
  38. 2/2 [Outreachy] stash: tolerate missing user identitySlavica Djukic, Nov 14, 2018
  39. Junio C HamanoNov 16, 2018
  40. 0/1 make stash work if user.name and user.email are not configuredSlavica Djukic, Nov 18, 2018
  41. 1/1 stash: tolerate missing user identitySlavica Djukic, Nov 18, 2018

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.