Code

Fix handling of git-p4 on deleted files
authorAndrew Waters <apwaters@googlemail.com>
Fri, 22 Oct 2010 12:26:02 +0000 (13:26 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 22 Oct 2010 18:51:10 +0000 (11:51 -0700)
Signed-off-by: Andrew Waters <apwaters@googlemail.com>
Tested-by: Thomas Berg <merlin66b@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/fast-import/git-p4

index c1ea643ace920e83a5577948553d4c9d1046abec..04ce7e3b020f489d59fe103970fc989d7b351127 100755 (executable)
@@ -706,7 +706,9 @@ class P4Submit(Command):
             submitTemplate = self.prepareLogMessage(template, logMessage)
             if os.environ.has_key("P4DIFF"):
                 del(os.environ["P4DIFF"])
-            diff = p4_read_pipe("diff -du ...")
+            diff = ""
+            for editedFile in editedFiles:
+                diff += p4_read_pipe("diff -du %r" % editedFile)
 
             newdiff = ""
             for newFile in filesToAdd: