diff -r ab6fd3205dad -r 0db6810e84e8 mercurial/patch.py --- a/mercurial/patch.py Sun Jan 18 15:15:40 2015 -0500 +++ b/mercurial/patch.py Sat Jan 17 15:03:41 2015 -0800 @@ -1831,10 +1831,7 @@ header.append('new file mode %s\n' % mode) elif ctx2.flags(f): losedatafn(f) - # In theory, if tn was copied or renamed we should check - # if the source is binary too but the copy record already - # forces git mode. - if util.binary(tn): + if util.binary(to) or util.binary(tn): if opts.git: binarydiff = True else: