@@ -85,8 +85,6 @@ def extract_checksum_from_tag(repo: Path, tag: str) -> str | None:
8585 )
8686
8787 for line in result .stdout .splitlines ():
88- if line .strip ().startswith ("Git-EVTag-Py-v0-SHA512: " ):
89- return line .split ("Git-EVTag-Py-v0-SHA512: " , 1 )[1 ].strip ()
9088 if line .strip ().startswith ("Git-EVTag-v0-SHA512: " ):
9189 return line .split ("Git-EVTag-v0-SHA512: " , 1 )[1 ].strip ()
9290 return None
@@ -98,7 +96,6 @@ def sign_tree_checksum(
9896 repo : Path ,
9997 tag : str ,
10098 in_csum : str ,
101- compat : bool = False ,
10299 tag_msg : str | None = None ,
103100 tag_msg_file : Path | None = None ,
104101) -> None :
@@ -134,17 +131,9 @@ def sign_tree_checksum(
134131 message = tmp .read ()
135132 unlink (tmp .name )
136133
137- pattern = (
138- r"\n?Git-EVTag-v0-SHA512: .*\n?"
139- if compat
140- else r"\n?Git-EVTag-Py-v0-SHA512: .*\n?"
141- )
134+ pattern = r"\n?Git-EVTag-v0-SHA512: .*\n?"
142135 cleaned_msg = re .sub (pattern , "" , message , flags = re .DOTALL ).rstrip ()
143- footer = (
144- f"\n \n Git-EVTag-v0-SHA512: { in_csum } \n "
145- if compat
146- else f"\n \n Git-EVTag-Py-v0-SHA512: { in_csum } \n "
147- )
136+ footer = f"\n \n Git-EVTag-v0-SHA512: { in_csum } \n "
148137 final_msg = cleaned_msg + footer
149138
150139 subprocess .run (
@@ -398,11 +387,6 @@ def parse_args() -> argparse.Namespace:
398387 "Create a signed and annotated tag from HEAD and append the EVTag checksum"
399388 ),
400389 )
401- parser .add_argument (
402- "--compat" ,
403- action = "store_true" ,
404- help = "Produce 'Git-EVTag-v0-SHA512' prefixed output" ,
405- )
406390 tag_msg = parser .add_mutually_exclusive_group ()
407391 tag_msg .add_argument (
408392 "-m" , "--tag-message" , help = "Use the input message as the tag message"
@@ -465,25 +449,19 @@ def main() -> int:
465449 calc_evtag_csum = checksum .get_digest ()
466450
467451 if not (args .verify or args .sign ):
468- if args .compat :
469- print (f"Git-EVTag-v0-SHA512: { calc_evtag_csum } " ) # noqa: T201
470- else :
471- print (f"Git-EVTag-Py-v0-SHA512: { calc_evtag_csum } " ) # noqa: T201
452+ print (f"Git-EVTag-v0-SHA512: { calc_evtag_csum } " ) # noqa: T201
472453 elif args .sign and in_tag :
473454 if args .tag_message :
474- sign_tree_checksum (
475- repo , in_tag , calc_evtag_csum , args .compat , tag_msg = args .tag_message
476- )
455+ sign_tree_checksum (repo , in_tag , calc_evtag_csum , tag_msg = args .tag_message )
477456 elif args .tag_message_file :
478457 sign_tree_checksum (
479458 repo ,
480459 in_tag ,
481460 calc_evtag_csum ,
482- args .compat ,
483461 tag_msg_file = args .tag_message_file ,
484462 )
485463 else :
486- sign_tree_checksum (repo , in_tag , calc_evtag_csum , args . compat )
464+ sign_tree_checksum (repo , in_tag , calc_evtag_csum )
487465 elif (
488466 args .verify
489467 and in_tag
0 commit comments