git add --patch
doesn't work with binary files added with git add -N
. Does anyone know why? In the following example you can see that git add --patch
picks up the text file a
but not the binary file 0
.
echo a > a
echo '\0' > 0
git add -N 0
git add -N a
git add --patch
diff --git a/a b/a
index e69de29..7898192 100644
--- a/a
+++ b/a
@@ -0,0 +1 @@
+a
Stage this hunk [y,n,q,a,d,/,e,?]? y