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

Re: [PATCH] Add --patchdepth parameter to git-am.sh

From
APAndy Parkins <andyparkins@gmail.com>
Date
Feb 7, 2007, 09:59 UTC
Message-ID
<200702070959.12819.andyparkins@gmail.com>
In-Reply-To
<7vfy9ibcdx.fsf@assigned-by-dhcp.cox.net>
On Wednesday 2007 February 07 08:27, Junio C Hamano wrote:
> I do not understand this remark, as applypatch does not have -p
> either.  If we were to do this, I agree with others that this

Oh. That /would/ make it confusing. I didn't realise they both didn't have it (I thought I had used it at some point in the past, my swiss cheese memory). In that case, the patch is a lot more relevant.

> should simply be called -p (we do not have name crash with
> existing options, do we?).

I have no problem with it being "-p"; I just don't like to take valuable single letter namespace unilaterally.

Show 7 quoted lines
> After seeing that a patch does not apply because the patch was
> generated at the wrong level, it would be very natural to use
> "git apply -p0 --index .dotest/patch" and then continue with
> "git am --resolved".  So obviously, -p to git-apply is very
> useful, but -p given to "am" means all of the patches in your
> mailbox has uniformly wrong patch depth.  I wonder how common
> would that be in practice.

I added it because I had need for it; I managed to manufacture a whole series of patches at the wrong patch level. It had been hard work to make them, so I didn't feel like making them all again just to change the depth.

> But other than that "how useful would that be in practice?"
> This is wrong if you do not use any $patchdepth.

Guilty. As I said, I added it for my own use; so didn't mind too much about weird output. If I resent it would be to drop my modifications to the message (it's redundant anyway - surely you know what you specified on the command line?), so feel free to just remove that hunk.

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
Previous: Jakub NarebskiNext: Andreas Ericsson
Message 27 of 36 in “Deprecation/Removal schedule”
  1. Junio C HamanoFeb 5, 2007
  2. Shawn O. PearceFeb 5, 2007
  3. Jakub NarebskiFeb 5, 2007
  4. Jakub NarebskiFeb 5, 2007
  5. Shawn O. PearceFeb 5, 2007
  6. Alex RiesenFeb 5, 2007
  7. Shawn O. PearceFeb 5, 2007
  8. Alex RiesenFeb 5, 2007
  9. Shawn O. PearceFeb 5, 2007
  10. Alex RiesenFeb 6, 2007
  11. Johannes SchindelinFeb 6, 2007
  12. Jeff KingFeb 6, 2007
  13. Johannes SchindelinFeb 6, 2007
  14. Alex RiesenFeb 6, 2007
  15. Johannes SchindelinFeb 6, 2007
  16. Alex RiesenFeb 6, 2007
  17. Alex RiesenFeb 6, 2007
  18. Mark WoodingFeb 5, 2007
  19. Johannes SchindelinFeb 5, 2007
  20. Alex RiesenFeb 5, 2007
  21. Linus TorvaldsFeb 5, 2007
  22. Junio C HamanoFeb 5, 2007
  23. Add --patchdepth parameter to git-am.shAndy Parkins, Feb 5, 2007
  24. Shawn O. PearceFeb 5, 2007
  25. Junio C HamanoFeb 7, 2007
  26. Jakub NarebskiFeb 7, 2007
  27. Andy ParkinsFeb 7, 2007
  28. Andreas EricssonFeb 6, 2007
  29. Alex RiesenFeb 6, 2007
  30. Johannes SchindelinFeb 6, 2007
  31. Junio C HamanoFeb 7, 2007
  32. Jakub NarebskiFeb 7, 2007
  33. Johannes SchindelinFeb 7, 2007
  34. Jakub NarebskiFeb 7, 2007
  35. Junio C HamanoFeb 7, 2007
  36. Johannes SchindelinFeb 7, 2007

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.