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

Re: Bootstrapping into git, commit gripes at me

From
MSMarc Singer <elf@buici.com>
Date
Jul 9, 2005, 01:11 UTC
Message-ID
<20050709011119.GA10981@buici.com>
In-Reply-To
<7v4qb46dff.fsf@assigned-by-dhcp.cox.net>
Show 6 quoted lines
>  $ git checkout -f v2.6.11 ;# fixed one
>  warning: v2.6.11 is not a commit -- not updating your HEAD
>  $ git commit ;# to have his own baseline at v2.6.11
>  $ git-apply --index --stat --summary --apply <../old-patch-file
>  $ : do the usual tests
>  $ git commit ;# create a commit based on the baseline v2.6.11

Interesting note. I tried the git-apply command and found that it complained and wouldn't succeed.

  elf@florence ~...embedded/linux-2.6 > git-apply --index --stat --summary --apply < ../ms16/ide.patch 
  error: patch failed: drivers/ide/ide-io.c:129
  error: drivers/ide/ide-io.c: patch does not apply
Yet, patch does apply.
  elf@florence ~...embedded/linux-2.6 > patch -p1 < ../ms16/ide.patch
  patching file drivers/ide/arm/ide_arm.c
  patching file drivers/ide/arm/ide-lpd7952x.c
  patching file drivers/ide/arm/ide-lpd7a40x.c
  patching file drivers/ide/arm/Makefile
  patching file drivers/ide/ide-disk.c
  Hunk #1 succeeded at 282 (offset 41 lines).
  Hunk #2 succeeded at 294 (offset 41 lines).
  patching file drivers/ide/ide-io.c
  Hunk #1 succeeded at 96 with fuzz 2 (offset -33 lines).
  Hunk #2 succeeded at 1227 (offset 189 lines).
  Hunk #3 succeeded at 1388 (offset 189 lines).
  Hunk #4 succeeded at 1689 (offset 187 lines).
  patching file drivers/ide/ide-iops.c
  patching file drivers/ide/ide-probe.c
  Hunk #1 succeeded at 422 (offset 51 lines).
  Hunk #2 succeeded at 784 (offset 59 lines).
  Hunk #3 succeeded at 847 (offset 59 lines).
  Hunk #4 succeeded at 1112 (offset 64 lines).
  Hunk #5 succeeded at 1172 (offset 64 lines).
  patching file drivers/ide/Kconfig
  Hunk #1 succeeded at 272 (offset -1 lines).
  Hunk #2 succeeded at 781 (offset 5 lines).
  patching file drivers/ide/legacy/ht6560b.c
  patching file drivers/ide/legacy/qd65xx.c
  patching file drivers/ide/pci/ns87415.c
  patching file drivers/ide/pci/sl82c105.c
  patching file drivers/ide/pci/trm290.c
  patching file drivers/ide/ppc/pmac.c
  Hunk #1 succeeded at 572 (offset 61 lines).
  Hunk #2 succeeded at 596 (offset 61 lines).
  patching file include/linux/ide.h
  Hunk #1 succeeded at 961 (offset 1 line).
  Hunk #2 succeeded at 1497 (offset -14 lines).

It should be obvious that a patch that doesn't apply cleanly, i.e. without rejects, is still useful to apply so that I can fix the places where it fails.

  o Why does patch work and git-apply fail?
  o Is there a way to force git to apply and safe the rejects?
Previous: Linus TorvaldsNext: Matthias Urlichs
Message 29 of 33 in “Bootstrapping into git, commit gripes at me”
  1. Marc SingerJul 8, 2005
  2. Linus TorvaldsJul 9, 2005
  3. Marc SingerJul 11, 2005
  4. Junio C HamanoJul 11, 2005
  5. Junio C HamanoJul 11, 2005
  6. Linus TorvaldsJul 12, 2005
  7. Linus TorvaldsJul 12, 2005
  8. Marc SingerJul 12, 2005
  9. Linus TorvaldsJul 12, 2005
  10. Linus TorvaldsJul 12, 2005
  11. Linus TorvaldsJul 12, 2005
  12. Marc SingerJul 12, 2005
  13. Linus TorvaldsJul 12, 2005
  14. Marc SingerJul 12, 2005
  15. Petr BaudisJul 12, 2005
  16. Junio C HamanoJul 12, 2005
  17. Matthias UrlichsJul 12, 2005
  18. Petr BaudisJul 24, 2005
  19. Junio C HamanoJul 24, 2005
  20. Linus TorvaldsJul 12, 2005
  21. Petr BaudisAug 12, 2005
  22. Junio C HamanoJul 12, 2005
  23. Linus TorvaldsJul 12, 2005
  24. Junio C HamanoJul 12, 2005
  25. Linus TorvaldsJul 12, 2005
  26. Marc SingerJul 12, 2005
  27. Daniel BarkalowJul 12, 2005
  28. Linus TorvaldsJul 11, 2005
  29. Marc SingerJul 9, 2005
  30. Matthias UrlichsJul 9, 2005
  31. Petr BaudisJul 10, 2005
  32. Marc SingerJul 9, 2005
  33. Junio C HamanoJul 9, 2005

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.