On Thu, 14 Aug 2008, Francis Moreau wrote:The thing is, "patch" is a total piece of utterly unbelievable SH*T. git-apply acts differently, yes, but it acts differently for a damn good reason. No, you cannot replace git-apply with that horrible crap that is GNU patch. Some of the reasons are purely trivial implementation issues: - git-apply knows about the index, and knows about updating it properly, including tracking new files automatically. That's an important thing, but yeah, it's an implementation issue. The other things that git-apply do right are much more fundamental: - git apply doesn't leave half-applied state turds around when a patch fails. People who actually use "patch" for large projects will know the pain here: if a diff fails in the middle, GNU patch will have applied the previous parts (including to other files), and it's now your problem to fix it up. There's no way to do an all-or-nothing patch, which is often a huge requirement. - git apply doesn't guess (unless you really tell it to, and even then it will guess a whole lot less than GNU patch). If a "git apply" succeeds, it was probably good. If a GNU patch invocation succeeds, it might have been total and utter crap, but hey, it tried to apply that piece of shit very aggressively even when it made no sense and the context didn't actually match even _remotely_. Yeah, context diffs can still mis-apply even with git apply, but they do so a hell of a lot less than with GNU patch, and if you want it to just generate a random end result, you at least have to _ask_ for it. So no. There's no way in hell that git am should use GNU patch. But as mentioned, if somebody wants to parse the dates, we could do that. Linus -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
| Linus Torvalds | Linux 2.6.21-rc4 |
| Jens Axboe | [PATCH 0/8] IO queuing and complete affinity |
| Nicholas A. Bellinger | Re: Integration of SCST in the mainstream Linux kernel |
| Robin Lee Powell | NFS hang + umount -f: better behaviour requested. |
git: | |
| David Miller | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Ingo Molnar | Re: [crash] BUG: unable to handle kernel NULL pointer dereference at 0000000000000... |
| Gerrit Renker | [PATCH 19/37] dccp: Header option insertion routine for feature-negotiation |
| Gary Thomas | Marvell 88E609x switch? |
| Jamie Lokier | Re: silent semantic changes with reiser4 |
| Jan Kara | [PATCH 10/16] ext4: Remove syncing logic from ext4_file_write |
| Jack Stone | Re: Versioning file system |
| Jens Axboe | [PATCH 8/8] vm: Add an tuning knob for vm.max_writeback_pages |
