diff options
author | Luke Diamand <luke@diamand.org> | 2012-01-19 09:52:26 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-01-20 14:47:35 -0800 |
commit | a37a8de8d61f5af3a2d347c6d6668f4316f48383 (patch) | |
tree | bf3cb16ef91b8b5f2c1cd7d4f0dd8f8536d5b8c8 /contrib/fast-import | |
parent | 52a4880bcda7780eeda5a884f73ffa83726dc982 (diff) | |
download | git-a37a8de8d61f5af3a2d347c6d6668f4316f48383.tar.gz git-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-x | contrib/fast-import/git-p4 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index e8c586e24..8aa84f2ca 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: |