views:

188

answers:

1

I'm using diff -Naur to send a single patch to a customer, in order to update their snapshot of our repository.

I tried using git diff -p to get a single file patch, but apparently it doesn't include new binary files in the patch

I know I should have used git-format-patch, but it creates patches which can be only used inside git and I haven't given the .git directory to our customer on purpose.

I resorted to using diff -Naur which does change the snapshot to the new one, but for one thing: if there are new files to be created, and they are empty, then they are not in the patched snapshot.

Before telling my customer to do a xargs touch < empty_file_list.txt I thought I'd ask here...

TIA

+2  A: 

diff is purely for text files. diff -b will tell you whether binary files differ but it won't generate a diff for them. Your options would either be to send a tar or zip file to your customer containing the binary files and a diff for the text files or to look into binary diff/patch utilities such as bsdiff.

Benno