##// END OF EJS Templates
patch: Fix nullid for binary git diffs (issue4054)...
Johan Bjork -
r19875:c172660e stable
parent child Browse files
Show More
@@ -10,7 +10,7 b' import cStringIO, email.Parser, os, errn'
10 10 import tempfile, zlib, shutil
11 11
12 12 from i18n import _
13 from node import hex, nullid, short
13 from node import hex, short
14 14 import base85, mdiff, scmutil, util, diffhelpers, copies, encoding, error
15 15 import context
16 16
@@ -1658,7 +1658,7 b' def trydiff(repo, revs, ctx1, ctx2, modi'
1658 1658
1659 1659 def gitindex(text):
1660 1660 if not text:
1661 return hex(nullid)
1661 text = ""
1662 1662 l = len(text)
1663 1663 s = util.sha1('blob %d\0' % l)
1664 1664 s.update(text)
@@ -183,7 +183,7 b' git=auto: regular diff for regular files'
183 183 % git=auto: git diff for newbinary
184 184 diff --git a/newbinary b/newbinary
185 185 new file mode 100644
186 index 0000000000000000000000000000000000000000..f76dd238ade08917e6712764a16a22005a50573d
186 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..f76dd238ade08917e6712764a16a22005a50573d
187 187 GIT binary patch
188 188 literal 1
189 189 Ic${MZ000310RR91
@@ -200,7 +200,7 b' git=auto: regular diff for regular files'
200 200 % git=auto: git diff for rmbinary
201 201 diff --git a/rmbinary b/rmbinary
202 202 deleted file mode 100644
203 index f76dd238ade08917e6712764a16a22005a50573d..0000000000000000000000000000000000000000
203 index f76dd238ade08917e6712764a16a22005a50573d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
204 204 GIT binary patch
205 205 literal 0
206 206 Hc$@<O00001
@@ -113,7 +113,7 b' Binary diff:'
113 113 $ cat b.diff
114 114 diff --git a/binfile.bin b/binfile.bin
115 115 new file mode 100644
116 index 0000000000000000000000000000000000000000..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9
116 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..37ba3d1c6f17137d9c5f5776fa040caf5fe73ff9
117 117 GIT binary patch
118 118 literal 593
119 119 zc$@)I0<QguP)<h;3K|Lk000e1NJLTq000mG000mO0ssI2kdbIM00009a7bBm000XU
General Comments 0
You need to be logged in to leave comments. Login now