Skip to content

Commit

Permalink
git-p4: cope with labels with empty descriptions
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luke Diamand authored and Junio C Hamano committed Jan 20, 2012
1 parent 52a4880 commit a37a8de
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a37a8de

Please sign in to comment.