Fix support for deletions in git-p4 submit when using --apply-as-patch by filtering out deletions in the diff-tree output.
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Simon Hausmann committed
Mar 21, 2007 at 10:57 UTC
5d0b6042d4a33dbd78840a8e0d8957441e2cfa72
1 file changed
+1
-1
contrib/fast-import/git-p4.py
+1
-1
@@ -197,7 +197,7 @@ class P4Sync(Command):
197
die("unknown modifier %s for %s" % (modifier, path))
198
199
if self.applyAsPatch:
200
- system("git-diff-tree -p \"%s^\" \"%s\" | patch -p1" % (id, id))
200
+ system("git-diff-tree -p --diff-filter=ACMRTUXB \"%s^\" \"%s\" | patch -p1" % (id, id))
201
else:
202
system("git-diff-files --name-only -z | git-update-index --remove -z --stdin")
203
system("git cherry-pick --no-commit \"%s\"" % id)