Allan Wind <allan_wind@xxxxxxxxxxxxxxxxx> wrote: > On 2008-06-21T23:51:18-0400, Shawn O. Pearce wrote: > > In order to apply the diff in reverse we need the old binary data > > in the diff output. So that's why its larger. > > Makes sense, thanks. In my use case (where I do not need the reverse > diff) this adds 500+ MB or 43159% overhead. Well, then in that case you have to omit --binary I think, or use a filter script to strip out the binary data from the resulting patch. > When I tried to apply the large diff my virtual private server with 512 > MB of memory git apply ran out of memory and died. Is there any way to > bound the memory usage of git apply? If you submit patches for it. ;-) git-apply today is meant for applying small patches, like those that would typically be written by a developer hacking on open source software. It tries to be completely atomic; either the entire patch applies at once, or the entire patch rejects with no changes being made to the local directory. As such it applies everything in memory, and only writes out when we are sure the patch applies clean. So no, there isn't a way to make git-apply use less memory. -- Shawn. -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html