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

Re: [PATCH v6 0/2] add-patch: classify '@' as a synonym for 'HEAD'

From
PWPhillip Wood <phillip.wood123@gmail.com>
Date
Feb 14, 2024, 11:06 UTC
Message-ID
<497155c2-43d0-4e3f-884f-b0296a56823e@gmail.com>
In-Reply-To
<20240213000601.520731-2-shyamthakkar001@gmail.com>
Hi Ghanshyam
On 13/02/2024 00:05, Ghanshyam Thakkar wrote:
Show 6 quoted lines
> I just noticed after sending v5 that, in one of the tests, while
> moving it inside the loop for also testing '@', set_and_save_state was
> not used therefore the subsequent tests after the first $opt will not have
> the changes for which we prove 'y' thereby making the tests useless.
> (Although it would not fail regardless of this). This got unnoticed by
> the previous reviews since v1 and me as well.

This version all looks fine to me, thanks for working on it. Thanks for removing the PERL prerequisite from the remaining tests. I think the change to "git checkout @" is a good idea as it makes "@" act like "HEAD", hopefully there aren't too many users relying on "git checkout @" to detach HEAD.

Best Wishes
Phillip
Show 33 quoted lines
> Apologies for the oversight and noise.
> 
> Ghanshyam Thakkar (2):
>    add-patch: classify '@' as a synonym for 'HEAD'
>    add -p tests: remove PERL prerequisites
> 
>   add-patch.c                    |  8 ------
>   builtin/checkout.c             |  4 ++-
>   builtin/reset.c                |  4 ++-
>   t/t2016-checkout-patch.sh      | 46 +++++++++++++++++++---------------
>   t/t2020-checkout-detach.sh     | 12 +++++++++
>   t/t2024-checkout-dwim.sh       |  2 +-
>   t/t2071-restore-patch.sh       | 46 ++++++++++++++++++----------------
>   t/t3904-stash-patch.sh         |  6 -----
>   t/t7105-reset-patch.sh         | 38 +++++++++++++++-------------
>   t/t7106-reset-unborn-branch.sh |  2 +-
>   t/t7514-commit-patch.sh        |  6 -----
>   11 files changed, 92 insertions(+), 82 deletions(-)
> 
> change since v5:
> diff --git a/t/t7105-reset-patch.sh b/t/t7105-reset-patch.sh
> index 0f597416d8..453872c8ba 100755
> --- a/t/t7105-reset-patch.sh
> +++ b/t/t7105-reset-patch.sh
> @@ -29,6 +29,7 @@ test_expect_success PERL 'saying "n" does nothing' '
>   for opt in "HEAD" "@" ""
>   do
>          test_expect_success PERL "git reset -p $opt" '
> +               set_and_save_state dir/foo work work &&
>                  test_write_lines n y | git reset -p $opt >output &&
>                  verify_state dir/foo work head &&
>                  verify_saved_state bar &&
> 
Previous: Ghanshyam ThakkarNext: Ghanshyam Thakkar
Message 23 of 46 in “add-patch: compare object id”
  1. Ghanshyam ThakkarJan 28, 2024
  2. 1/2 add-patch: compare object id instead of literal stringGhanshyam Thakkar, Jan 28, 2024
  3. Patrick SteinhardtJan 29, 2024
  4. Ghanshyam ThakkarJan 30, 2024
  5. Junio C HamanoJan 30, 2024
  6. Junio C HamanoJan 29, 2024
  7. Junio C HamanoJan 29, 2024
  8. Ghanshyam ThakkarJan 30, 2024
  9. 2/2 checkout: remove HEAD special caseGhanshyam Thakkar, Jan 28, 2024
  10. Patrick SteinhardtJan 29, 2024
  11. 0/2 add-patch: Support '@' as a synonym for 'HEAD'Ghanshyam Thakkar, Feb 2, 2024
  12. 1/2 add-patch: remove non-relevant NEEDSWORK commentGhanshyam Thakkar, Feb 2, 2024
  13. 2/2 add-patch: classify '@' as a synonym for 'HEAD'Ghanshyam Thakkar, Feb 2, 2024
  14. Junio C HamanoFeb 2, 2024
  15. Junio C HamanoFeb 2, 2024
  16. Ghanshyam ThakkarFeb 2, 2024
  17. Ghanshyam ThakkarFeb 2, 2024
  18. Ghanshyam ThakkarFeb 2, 2024
  19. 0/2 add-patch: '@' as a synonym for 'HEAD'Ghanshyam Thakkar, Feb 3, 2024
  20. 0/3 '@' as a synonym for 'HEAD' in patch modeGhanshyam Thakkar, Feb 6, 2024
  21. 0/2 add-patch: classify '@' as a synonym for 'HEAD'Ghanshyam Thakkar, Feb 11, 2024
  22. 0/2 add-patch: classify '@' as a synonym for 'HEAD'Ghanshyam Thakkar, Feb 13, 2024
  23. Phillip WoodFeb 14, 2024
  24. 1/2 add-patch: classify '@' as a synonym for 'HEAD'Ghanshyam Thakkar, Feb 13, 2024
  25. 2/2 add -p tests: remove PERL prerequisitesGhanshyam Thakkar, Feb 13, 2024
  26. 1/2 add-patch: classify '@' as a synonym for 'HEAD'Ghanshyam Thakkar, Feb 11, 2024
  27. Junio C HamanoFeb 12, 2024
  28. 2/2 add -p tests: remove PERL prerequisitesGhanshyam Thakkar, Feb 11, 2024
  29. 1/3 add-patch: remove unnecessary NEEDSWORK commentGhanshyam Thakkar, Feb 6, 2024
  30. Phillip WoodFeb 7, 2024
  31. 2/3 add-patch: classify '@' as a synonym for 'HEAD'Ghanshyam Thakkar, Feb 6, 2024
  32. Junio C HamanoFeb 7, 2024
  33. Phillip WoodFeb 7, 2024
  34. Ghanshyam ThakkarFeb 9, 2024
  35. 3/3 add -p tests: remove Perl prerequisiteGhanshyam Thakkar, Feb 6, 2024
  36. Phillip WoodFeb 7, 2024
  37. Phillip WoodFeb 7, 2024
  38. Junio C HamanoFeb 7, 2024
  39. Eric SunshineFeb 7, 2024
  40. 1/2 add-patch: remove unnecessary NEEDSWORK commentGhanshyam Thakkar, Feb 3, 2024
  41. 2/2 add-patch: classify '@' as a synonym for 'HEAD'Ghanshyam Thakkar, Feb 3, 2024
  42. Junio C HamanoFeb 3, 2024
  43. Ghanshyam ThakkarFeb 5, 2024
  44. Phillip WoodFeb 5, 2024
  45. Ghanshyam ThakkarFeb 5, 2024
  46. Junio C HamanoFeb 5, 2024

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.