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

Re: [PATCH 1/3] t3403: fix commit authorship

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Aug 17, 2021, 10:05 UTC
Message-ID
<9444dcd0-4733-aed1-0b94-6aa6337552dd@gmail.com>
In-Reply-To
<xmqq8s11s5wk.fsf@gitster.g>
On 16/08/2021 17:36, Junio C Hamano wrote:
Show 38 quoted lines
> Phillip Wood <phillip.wood123@gmail.com> writes:
> 
>> I wonder if it would be better to hard code the author in this test rather
>> than rather than relying on git log like this
> 
> To be quite honest, I am pretty happy with the tests as posted, and
> the choice among various ways we are discussing depends on what the
> likely mode of breakage we expect.
> 
> The breakage we are expecting to catch in the second hunk of your
> patch is somehow "rebase -i" fails to keep the authorship of
> amended-goodbye and ends up making the commit at HEAD under
> different authorship.
> 
>   - A likely source of a different authorship information that would
>     be recorded, when such a bug gets introduced, is from the
>     environment (i.e. GIT_AUTHOR_NAME etc. that test-lib.sh sets up).
>     This can happen by a new bug in the test added before the second
>     hunk of your patch we see below, and with or without this patch,
>     such a bug in the test will not be caught.
> 
>   - Or amended-goodbye may by a test bug have been recorded under a
>     wrong authorship information to begin with, and if it were done
>     as the default author we use in our tests (i.e. the bug you fixed
>     in your patch that started this thread).  If we reintroduced such
>     a bug, the second hunk of this patch will help.
> 
>   - Or the variable $another_author gets clobbered in a future change
>     between the two hunks of this patch, and the check in the second
>     hunk would be broken.
> 
> Overall, I do not think any of the above breakage is so likely to
> happen, and that is why I am happy with the tests as posted.  The
> necessity for a plain shell variable to retain its value for such a
> long haul across tests the patch below introduces may be making the
> test more brittle than safer.
> 
> So...
Okay lets leave the test as it is then
Thanks
Phillip
Previous: Junio C HamanoNext: Phillip Wood via GitGitGadget
Message 10 of 25 in “rebase --continue: remove .git/MERGE_MSG”
  1. 0/3 rebase --continue: remove .git/MERGE_MSGPhillip Wood via GitGitGadget, Aug 10, 2021
  2. 1/3 t3403: fix commit authorshipPhillip Wood via GitGitGadget, Aug 10, 2021
  3. Elijah NewrenAug 10, 2021
  4. Junio C HamanoAug 10, 2021
  5. Phillip WoodAug 12, 2021
  6. Johannes SchindelinAug 14, 2021
  7. Junio C HamanoAug 15, 2021
  8. Phillip WoodAug 15, 2021
  9. Junio C HamanoAug 16, 2021
  10. Phillip WoodAug 17, 2021
  11. 2/3 rebase --apply: restore some testsPhillip Wood via GitGitGadget, Aug 10, 2021
  12. Elijah NewrenAug 10, 2021
  13. Phillip WoodAug 12, 2021
  14. 3/3 rebase --continue: remove .git/MERGE_MSGPhillip Wood via GitGitGadget, Aug 10, 2021
  15. Elijah NewrenAug 10, 2021
  16. 0/3 rebase --continue: remove .git/MERGE_MSGPhillip Wood via GitGitGadget, Aug 12, 2021
  17. 1/3 t3403: fix commit authorshipPhillip Wood via GitGitGadget, Aug 12, 2021
  18. 2/3 rebase --apply: restore some testsPhillip Wood via GitGitGadget, Aug 12, 2021
  19. 3/3 rebase --continue: remove .git/MERGE_MSGPhillip Wood via GitGitGadget, Aug 12, 2021
  20. Junio C HamanoAug 13, 2021
  21. Phillip WoodAug 14, 2021
  22. Elijah NewrenAug 13, 2021
  23. Junio C HamanoAug 13, 2021
  24. Elijah NewrenAug 13, 2021
  25. Phillip WoodAug 14, 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.