From: Colin McCabe Date: Fri, 24 Aug 2012 22:09:09 GMT Subject: bug: when applying binary diffs, -p0 is ignored Message-ID: I found a bug in git's handling of binary diff segments. When applying binary diffs using -p0, the prefix (or --strip) argument is ignored. For example, try this: git apply -p0 --binary <<'EOF' diff --git a/init.tar.gz a/init.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000.. 386b94f511a17a8a3d62eb6cec14694cb9b9b51d GIT binary patch literal 118 zcmb2|=3qGT-8_JS`RzGFp(Y0bmIKvX{ySXzs`-OhSfm*K#a}SG%CY!eN_LjnjGuP- zFHDep|-nAGgFaXfQAU0L+LoA^-pY literal 0 HcmV?d00001 EOF It will create init.tar.gz, but in the root of the repository, not in a/ (Sorry if my mailer wraps the long index line) cheers, Colin McCabe