Browse Source

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>
maint
Luke Diamand 13 years ago committed by Junio C Hamano
parent
commit
a37a8de8d6
  1. 8
      contrib/fast-import/git-p4

8
contrib/fast-import/git-p4

@ -1741,9 +1741,11 @@ class P4Sync(Command, P4UserMap): @@ -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:

Loading…
Cancel
Save