[Bug 4054] New: Creating an git binary diff from a zero length file creates patch that git won't accept
mercurial-bugs at selenic.com
mercurial-bugs at selenic.com
Mon Oct 7 13:29:07 UTC 2013
http://bz.selenic.com/show_bug.cgi?id=4054
Priority: normal
Bug ID: 4054
CC: mercurial-devel at selenic.com
Assignee: bugzilla at selenic.com
Summary: Creating an git binary diff from a zero length file
creates patch that git won't accept
Severity: bug
Classification: Unclassified
OS: Linux
Reporter: jbjoerk at gmail.com
Hardware: PC
Status: UNCONFIRMED
Version: 2.7.2
Component: Mercurial
Product: Mercurial
Steps to reproduce:
hg init
touch a; hg add a; hg commit -m "add empty file"
hg diff --git
On my system this gives:
diff --git a/a b/a
index
0000000000000000000000000000000000000000..4acf3b0d1a0cdce7ddc0e087c7714d2f9c01c8f1
GIT binary patch
literal 114032
...
The actual output should be:
diff --git a/a b/a
index
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..4acf3b0d1a0cdce7ddc0e087c7714d2f9c01c8f1
GIT binary patch
literal 114032
...
"git apply" does not accept the first diff with the error:
error: the patch applies to 'a' (e69de29bb2d1d6434b8b29ae775ad8c2e48c5391),
which does not match the current contents.
error: a: patch does not apply
e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 is the null git revision.
This happens with 2.7.2+12-a69a77a80900
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Mercurial-devel
mailing list