only run p4 print if necessary
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Han-Wen Nienhuys committed
May 23, 2007 at 18:49 UTC
f2eda79f6967363f9377ef3b137a35d0c86aca2c
1 file changed
+3
contrib/fast-import/git-p4
+3
@@ -677,6 +677,9 @@ class P4Sync(Command):
677
specs = [(f['path'] + "#" + f['rev'], f) for f in files
678
if f['action'] != 'delete']
679
680
+ if not specs:
681
+ return
682
+
683
data = read_pipe('p4 print %s' % ' '.join(['"%s"' % path
684
for (path, info) in specs]))
685