From: Simon Hausmann Date: Wed, 21 Mar 2007 09:57:54 +0000 (+0100) Subject: Fix support for deletions in git-p4 submit when using --apply-as-patch by filtering... X-Git-Tag: v1.5.3-rc0~65^2^2~164 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5d0b6042d4a33dbd78840a8e0d8957441e2cfa72;p=git.git 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 --- diff --git a/contrib/fast-import/git-p4.py b/contrib/fast-import/git-p4.py index 2009dce23..336c3eab5 100755 --- a/contrib/fast-import/git-p4.py +++ b/contrib/fast-import/git-p4.py @@ -197,7 +197,7 @@ class P4Sync(Command): die("unknown modifier %s for %s" % (modifier, path)) if self.applyAsPatch: - system("git-diff-tree -p \"%s^\" \"%s\" | patch -p1" % (id, id)) + system("git-diff-tree -p --diff-filter=ACMRTUXB \"%s^\" \"%s\" | patch -p1" % (id, id)) else: system("git-diff-files --name-only -z | git-update-index --remove -z --stdin") system("git cherry-pick --no-commit \"%s\"" % id)