git-p4: move inline comments to line above

PEP8 recommends that all inline comments should be separated from code by two spaces, in the "Inline Comments" section: https://www.python.org/dev/peps/pep-0008/#inline-comments However, because all instances of these inline comments extended to an excessive line length, they have been moved onto a seprate line. Signed-off-by: Joel Holdsworth <jholdsworth@nvidia.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Joel Holdsworth committed Apr 1, 2022 at 15:25 UTC 4768af208850ef3de74908c498acf9f8956cf545
1 file changed +7 -3
git-p4.py
+7 -3
@@ -1979,7 +1979,9 @@ class P4Submit(Command, P4UserMap):
1979 for line in f.readlines():
1980 newdiff += "+" + line
1981 except UnicodeDecodeError:
1982 - pass # Found non-text data and skip, since diff description should only include text
1982 + # Found non-text data and skip, since diff description
1983 + # should only include text
1984 + pass
1985 f.close()
1986
1987 return (diff + newdiff).replace('\r\n', '\n')
@@ -2975,7 +2977,8 @@ class P4Sync(Command, P4UserMap):
2977 if 'fileSize' in self.stream_file:
2978 size = int(self.stream_file['fileSize'])
2979 else:
2978 - size = 0 # deleted files don't get a fileSize apparently
2980 + # Deleted files don't get a fileSize apparently
2981 + size = 0
2982 sys.stdout.write('\r%s --> %s (%s)\n' % (
2983 file_path, relPath, format_size_human_readable(size)))
2984 sys.stdout.flush()
@@ -4233,7 +4236,8 @@ class P4Unshelve(Command):
4236 for i in range(0, 1000):
4237 backup_branch_name = "{0}.{1}".format(branch_name, i)
4238 if not gitBranchExists(backup_branch_name):
4236 - gitUpdateRef(backup_branch_name, branch_name) # copy ref to backup
4239 + # Copy ref to backup
4240 + gitUpdateRef(backup_branch_name, branch_name)
4241 gitDeleteRef(branch_name)
4242 found = True
4243 print("renamed old unshelve branch to {0}".format(backup_branch_name))