1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-18 03:06:17 +02:00

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>
This commit is contained in:
Luke Diamand 2012-01-19 09:52:26 +00:00 committed by Junio C Hamano
parent 52a4880bcd
commit a37a8de8d6

View File

@ -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: