Re: stgit truncates binary files to zero length when applying patches
- From
- Catalin Marinas <catalin.marinas@gmail.com>
- Date
- Nov 16, 2005, 12:31 UTC
- Message-ID
- <b0943d9e0511160431r6c852e5fn@mail.gmail.com>
- In-Reply-To
- <20051116115449.GA5933@diana.vm.bytemark.co.uk>
On 16/11/05, Karl Hasselström <kha@treskal.com> wrote:
Show 9 quoted lines
> On 2005-11-16 11:11:56 +0000, Catalin Marinas wrote: > > Unfortunately, git-apply doesn't fail for patches including binary > > files and simply creates an empty file. I think git-apply should be > > changed to fail to apply this kind of patches. > > Yes, at least if stgit is going to continue to use it like this. > Refusing to handle binary files is somewhat disappointing, but still > OK; agreeing to handle them and then silently wiping them is a bit > less OK.
A workaround for this would be to add a config option for StGIT to always use the three-way merge for pushing patches. The problem with this is speed since git-diff-tree | git-apply is much faster (and pretty safe since fuzzy patching is not allowed) and most of the patches would apply cleanly with only this.
-- Catalin