summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorLibravatar Luke Diamand <luke@diamand.org>2012-01-19 09:52:26 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-01-20 14:47:35 -0800
commita37a8de8d61f5af3a2d347c6d6668f4316f48383 (patch)
treebf3cb16ef91b8b5f2c1cd7d4f0dd8f8536d5b8c8 /contrib/fast-import
parentgit-p4: handle p4 branches and labels containing shell chars (diff)
downloadtgif-a37a8de8d61f5af3a2d347c6d6668f4316f48383.tar.xz
git-p4: cope with labels with empty descriptions
Use an explicit length for the data in a label, rather than EOT, so that labels with empty descriptions are passed through correctly. Signed-off-by: Luke Diamand <luke@diamand.org> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p48
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index e8c586e242..8aa84f2caf 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1741,9 +1741,11 @@ class P4Sync(Command, P4UserMap):
else:
tagger = "%s <a@b> %s %s" % (owner, epoch, self.tz)
self.gitStream.write("tagger %s\n" % tagger)
- self.gitStream.write("data <<EOT\n")
- self.gitStream.write(labelDetails["Description"])
- self.gitStream.write("EOT\n\n")
+
+ description = labelDetails["Description"]
+ self.gitStream.write("data %d\n" % len(description))
+ self.gitStream.write(description)
+ self.gitStream.write("\n")
else:
if not self.silent: