aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSimon Hausmann <simon@lst.de>2007-06-11 10:01:58 +0200
committerSimon Hausmann <simon@lst.de>2007-06-11 10:01:58 +0200
commit6581de096e8323385b8ec7d467e91927a80ce3b9 (patch)
treeb389076c34b62ef6691bd35b675c2e3879add31d /contrib
parenta43ff00c7c2981426d06b3621bbf62476aa5ec0d (diff)
downloadgit-6581de096e8323385b8ec7d467e91927a80ce3b9.tar.gz
git-6581de096e8323385b8ec7d467e91927a80ce3b9.tar.xz
Write out the options tag in the log message of imports only if we actually have
options Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p411
1 files changed, 5 insertions, 6 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index ff5618131..e380c149b 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -765,12 +765,11 @@ class P4Sync(Command):
self.gitStream.write("data <<EOT\n")
self.gitStream.write(details["desc"])
- self.gitStream.write("\n[git-p4: depot-paths = \"%s\": change = %s: "
- "options = %s]\n"
- % (','.join (branchPrefixes), details["change"],
- details['options']
- ))
- self.gitStream.write("EOT\n\n")
+ self.gitStream.write("\n[git-p4: depot-paths = \"%s\": change = %s"
+ % (','.join (branchPrefixes), details["change"]))
+ if len(details['options']) > 0:
+ self.gitStream.write(": options = %s" % details['options'])
+ self.gitStream.write("]\nEOT\n\n")
if len(parent) > 0:
if self.verbose: