stgit truncates binary files to zero length when applying patches
- From
Karl Hasselström <kha@treskal.com>
- Date
- Nov 15, 2005, 14:42 UTC
- Message-ID
- <20051115144223.GA18111@diana.vm.bytemark.co.uk>
When applying patches and not fast-forwarding, stgit truncates the binary files to zero length:
$ cg-init . defaulting to local storage area Committing initial tree 4b825dc642cb6eb9a060e54bf8d69288fbee4904 Committed as 73161b6ee428ac8b1c1b16b560c40e13330693d2.
$ stg init
$ stg new foo Invoking the editor: "emacs .stgit.msg"... done (exit code: 0)
$ cp /bin/bash .
$ stg add bash
$ stg refresh Refreshing patch "foo"... done
$ ls -l total 584 -rwxr-xr-x 1 kha vtech 593304 Nov 15 15:34 bash*
$ stg pop Popping patch "foo"... done No patches applied
$ stg new bar Invoking the editor: "emacs .stgit.msg"... done (exit code: 0)
$ echo bar > bar.txt
$ stg add bar.txt
$ stg refresh Refreshing patch "bar"... done
$ stg push foo Pushing patch "foo"... done Now at patch "foo"
$ ls -l total 4 -rw-r--r-- 1 kha vtech 4 Nov 15 15:34 bar.txt -rwxr-xr-x 1 kha vtech 0 Nov 15 15:35 bash*
Without the "bar" patch, popping and then pushing "foo" works as expected.
--
Karl Hasselström, kha@treskal.com
www.treskal.com/kalle