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

Re: stripping [PATCH] without losing later tags from mailed patches (Re: [ 02/12] Remove COMPAT_IA32 support)

From
Thomas Rast <trast@inf.ethz.ch>
Date
Mar 12, 2012, 21:47 UTC
Message-ID
<87399dpk48.fsf@thomas.inf.ethz.ch>
In-Reply-To
<7vvcm9snko.fsf@alter.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> writes:
Show 17 quoted lines
> Jonathan Nieder <jrnieder@gmail.com> writes:
>
>> Thomas Rast wrote:
>>
>>> The problem with -b is that it's a backwards-compatibility shorthand for
>>> --binary, which used to pass --allow-binary-replacement (or --binary) to
>>> git-apply.  However, that option was obsoleted in 2b6eef9 (Make apply
>>> --binary a no-op., 2006-09-06) and has been a no-op for over 5 years.
>>> It has also not been documented since cb3a160 (git-am: ignore --binary
>>> option, 2008-08-09).
>>>
>>> So perhaps we can safely claim -b for --keep-non-patch, like so:
>
> We can delete "git am -b" (as it was deprecated long time ago), wait
> for a cycle or two, and then repurpose it.  I do not mind starting
> the first step (delete, but do not say anything about repurposing)
> before 1.7.10-rc1 happens.

Ok, but if I don't get to say anything about repurposing, can I at least make it an error message instead of just spewing out the "invalid option" help?

----- 8< -----
Subject: [PATCH] git-am: error out when seeing -b/--binary

The --binary option to git-apply has been a no-op since 2b6eef9 (Make apply --binary a no-op., 2006-09-06) and was deprecated in cb3a160 (git-am: ignore --binary option, 2008-08-09).

We could remove it outright, but let's be nice to people who still have scripts saying 'git am -b' (if they exist) and tell them the reason for the sudden failure.

Signed-off-by: Thomas Rast <trast@student.ethz.ch>
---
 git-am.sh |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/git-am.sh b/git-am.sh
index 0bd290b..faae820 100755
--- a/git-am.sh
+++ b/git-am.sh
@@ -380,7 +380,9 @@ do
 	-i|--interactive)
 		interactive=t ;;
 	-b|--binary)
-		: ;;
+		echo >&2 "The -b/--binary option was deprecated in 1.6.0 and removed in 1.7.10."
+		die "Please adjust your scripts."
+		;;
 	-3|--3way)
 		threeway=t ;;
 	-s|--signoff)
-- 
Thomas Rast
trast@{inf,student}.ethz.ch
Previous: Willy TarreauNext: Jonathan Nieder
Message 12 of 37 in “stripping [PATCH] without losing later tags from mailed patches (Re: [ 02/12] Remove COMPAT_IA32 support)”
  1. Jonathan NiederMar 12, 2012
  2. Willy TarreauMar 12, 2012
  3. Greg KHMar 12, 2012
  4. Willy TarreauMar 12, 2012
  5. Thomas RastMar 12, 2012
  6. Willy TarreauMar 12, 2012
  7. Jonathan NiederMar 12, 2012
  8. Junio C HamanoMar 12, 2012
  9. Willy TarreauMar 12, 2012
  10. Jonathan NiederMar 12, 2012
  11. Willy TarreauMar 12, 2012
  12. Thomas RastMar 12, 2012
  13. Jonathan NiederMar 12, 2012
  14. Thomas RastMar 12, 2012
  15. Jonathan NiederMar 12, 2012
  16. Thomas RastMar 13, 2012
  17. Jonathan NiederMar 13, 2012
  18. Thomas RastMar 13, 2012
  19. Junio C HamanoMar 13, 2012
  20. Jonathan NiederMar 13, 2012
  21. Junio C HamanoMar 13, 2012
  22. git-am: officially deprecate -b/--binaryJunio C Hamano, Mar 13, 2012
  23. Junio C HamanoMar 12, 2012
  24. Junio C HamanoMar 12, 2012
  25. Junio C HamanoMar 12, 2012
  26. Willy TarreauMar 12, 2012
  27. Junio C HamanoMar 12, 2012
  28. Willy TarreauMar 12, 2012
  29. Junio C HamanoMar 12, 2012
  30. Greg KHMar 12, 2012
  31. Junio C HamanoMar 12, 2012
  32. Greg KHMar 12, 2012
  33. Junio C HamanoMar 12, 2012
  34. Willy TarreauMar 12, 2012
  35. Jonathan NiederMar 12, 2012
  36. SergioMar 13, 2012
  37. Thomas RastMar 13, 2012

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.