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

Re: [PATCH v3 2/3] fast-export: rename --signed-tags='warn' to 'warn-verbatim'

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 28, 2021, 03:29 UTC
Message-ID
<xmqqpmyfccjb.fsf@gitster.g>
In-Reply-To
<20210423164118.693197-3-lukeshu@lukeshu.com>
Luke Shumaker <lukeshu@lukeshu.com> writes:
Show 15 quoted lines
> ---signed-tags=(verbatim|warn|warn-strip|strip|abort)::
> +--signed-tags=(verbatim|warn-verbatim|warn-strip|strip|abort)::
>  	Specify how to handle signed tags.  Since any transformation
>  	after the export can change the tag names (which can also happen
>  	when excluding revisions) the signatures will not match.
> @@ -36,8 +36,10 @@ When asking to 'abort' (which is the default), this program will die
>  when encountering a signed tag.  With 'strip', the tags will silently
>  be made unsigned, with 'warn-strip' they will be made unsigned but a
>  warning will be displayed, with 'verbatim', they will be silently
> -exported and with 'warn', they will be exported, but you will see a
> -warning.
> +exported and with 'warn-verbatim', they will be exported, but you will
> +see a warning.
> ++
> +`warn` is a deprecated synonym of `warn-verbatim`.
Two minor points
 - Is it obvious to everybody what is the implication of using
   "verbatim" (which in turn would bring the readers to realize why
   it often deserves a warning)?  If not, would it make sense to
   explain why "verbatim" may (may not) be a good idea in different
   situations?
 - I am not sure a deprecated synonym deserves a separate paragraph.
   ... silently exported, and with 'warn-verbatim' (or `warn`, a
   deprecated synonym), they will be exported with a warning.
   may be less irritating to the eyes, perhaps?
Show 13 quoted lines
> diff --git a/builtin/fast-export.c b/builtin/fast-export.c
> index 85a76e0ef8..d121dd2ee6 100644
> --- a/builtin/fast-export.c
> +++ b/builtin/fast-export.c
> @@ -55,7 +55,7 @@ static int parse_opt_signed_tag_mode(const struct option *opt,
>  		signed_tag_mode = SIGNED_TAG_ABORT;
>  	else if (!strcmp(arg, "verbatim") || !strcmp(arg, "ignore"))
>  		signed_tag_mode = VERBATIM;
> -	else if (!strcmp(arg, "warn"))
> +	else if (!strcmp(arg, "warn-verbatim") || !strcmp(arg, "warn"))
>  		signed_tag_mode = WARN;
>  	else if (!strcmp(arg, "warn-strip"))
>  		signed_tag_mode = WARN_STRIP;

It would be preferrable to do s/WARN/WARN_VERBATIM/ at this step, as the plan is to deprecate "warn", even if you are going to redo the enums in later steps. May want to consider doing so as a clean-up iff this topic need rerolling for other reasons.

Show 13 quoted lines
> diff --git a/t/t9350-fast-export.sh b/t/t9350-fast-export.sh
> index 409b48e244..892737439b 100755
> --- a/t/t9350-fast-export.sh
> +++ b/t/t9350-fast-export.sh
> @@ -253,6 +253,24 @@ test_expect_success 'signed-tags=verbatim' '
>  
>  '
>  
> +test_expect_success 'signed-tags=warn-verbatim' '
> +
> +	git fast-export --signed-tags=warn-verbatim sign-your-name >output 2>err &&
> +	grep PGP output &&
> +	test -s err

I didn't look at the surrounding existing tests, but in general "test -s err" is not a good ingredient in any test. The feature you happen to care about today may not stay to be be the only thing that writes to the standard error stream.

Previous: Luke ShumakerNext: Luke Shumaker
Message 11 of 60 in “fast-export, fast-import: implement signed-commits”
  1. 0/3 fast-export, fast-import: implement signed-commitsLuke Shumaker, Apr 22, 2021
  2. 1/3 git-fast-import.txt: add missing LF in the BNFLuke Shumaker, Apr 22, 2021
  3. 2/3 fast-export: rename --signed-tags='warn' to 'warn-verbatim'Luke Shumaker, Apr 22, 2021
  4. Eric SunshineApr 22, 2021
  5. Luke ShumakerApr 22, 2021
  6. Luke ShumakerApr 22, 2021
  7. 3/3 fast-export, fast-import: implement signed-commitsLuke Shumaker, Apr 22, 2021
  8. 0/3 fast-export, fast-import: implement signed-commitsLuke Shumaker, Apr 23, 2021
  9. 1/3 git-fast-import.txt: add missing LF in the BNFLuke Shumaker, Apr 23, 2021
  10. 2/3 fast-export: rename --signed-tags='warn' to 'warn-verbatim'Luke Shumaker, Apr 23, 2021
  11. Junio C HamanoApr 28, 2021
  12. Luke ShumakerApr 29, 2021
  13. Junio C HamanoApr 30, 2021
  14. 3/3 fast-export, fast-import: implement signed-commitsLuke Shumaker, Apr 23, 2021
  15. Junio C HamanoApr 28, 2021
  16. Luke ShumakerApr 29, 2021
  17. Elijah NewrenApr 29, 2021
  18. Junio C HamanoApr 29, 2021
  19. Elijah NewrenApr 30, 2021
  20. Junio C HamanoApr 30, 2021
  21. Luke ShumakerApr 30, 2021
  22. Luke ShumakerApr 30, 2021
  23. Elijah NewrenApr 30, 2021
  24. Luke ShumakerApr 30, 2021
  25. 0/5 fast-export, fast-import: add support for signed-commitsLuke Shumaker, Apr 30, 2021
  26. 1/5 git-fast-import.txt: add missing LF in the BNFLuke Shumaker, Apr 30, 2021
  27. 2/5 fast-export: rename --signed-tags='warn' to 'warn-verbatim'Luke Shumaker, Apr 30, 2021
  28. 3/5 git-fast-export.txt: clarify why 'verbatim' may not be a good ideaLuke Shumaker, Apr 30, 2021
  29. 4/5 fast-export: do not modify memory from get_commit_bufferLuke Shumaker, Apr 30, 2021
  30. Junio C HamanoMay 3, 2021
  31. 5/5 fast-export, fast-import: add support for signed-commitsLuke Shumaker, Apr 30, 2021
  32. Junio C HamanoMay 3, 2021
  33. 0/6 fast-export, fast-import: add support for signed-commitsChristian Couder, Feb 24, 2025
  34. 1/6 git-fast-import.adoc: add missing LF in the BNFChristian Couder, Feb 24, 2025
  35. 2/6 fast-export: fix missing whitespace after switchChristian Couder, Feb 24, 2025
  36. 3/6 fast-export: rename --signed-tags='warn' to 'warn-verbatim'Christian Couder, Feb 24, 2025
  37. 4/6 git-fast-export.txt: clarify why 'verbatim' may not be a good ideaChristian Couder, Feb 24, 2025
  38. Elijah NewrenFeb 24, 2025
  39. Christian CouderMar 10, 2025
  40. 5/6 fast-export: do not modify memory from get_commit_bufferChristian Couder, Feb 24, 2025
  41. 6/6 fast-export, fast-import: add support for signed-commitsChristian Couder, Feb 24, 2025
  42. Elijah NewrenFeb 25, 2025
  43. Junio C HamanoFeb 25, 2025
  44. Christian CouderMar 10, 2025
  45. Junio C HamanoFeb 24, 2025
  46. Elijah NewrenFeb 25, 2025
  47. Patrick SteinhardtFeb 25, 2025
  48. Elijah NewrenFeb 25, 2025
  49. Junio C HamanoFeb 25, 2025
  50. Christian CouderMar 10, 2025
  51. Phillip WoodFeb 25, 2025
  52. Christian CouderMar 10, 2025
  53. 0/6 fast-export, fast-import: add support for signed-commitsChristian Couder, Mar 10, 2025
  54. 1/6 git-fast-import.adoc: add missing LF in the BNFChristian Couder, Mar 10, 2025
  55. 2/6 fast-export: fix missing whitespace after switchChristian Couder, Mar 10, 2025
  56. 3/6 fast-export: rename --signed-tags='warn' to 'warn-verbatim'Christian Couder, Mar 10, 2025
  57. 4/6 git-fast-export.adoc: clarify why 'verbatim' may not be a good ideaChristian Couder, Mar 10, 2025
  58. 5/6 fast-export: do not modify memory from get_commit_bufferChristian Couder, Mar 10, 2025
  59. 6/6 fast-export, fast-import: add support for signed-commitsChristian Couder, Mar 10, 2025
  60. Elijah NewrenMar 10, 2025

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.