From: Catalin Marinas Date: Wed, 16 Nov 2005 11:11:56 GMT Subject: Re: stgit truncates binary files to zero length when applying patches Message-ID: In-Reply-To: <20051115144223.GA18111@diana.vm.bytemark.co.uk> On 15/11/05, Karl Hasselström wrote: > When applying patches and not fast-forwarding, stgit truncates the > binary files to zero length: I've never tried binaries with StGIT before. When pushing a patch, if a merge is needed (like in your case, the base of the foo patch has changed), StGIT first tries "git-diff-tree | git-apply" for speed reasons. If this fails, it falls back to a three-way merge. 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. -- Catalin