changeset 8808:9a2c0a067c6e

vcs: simplify for loop in git fetch
author Mads Kiilerich <mads@kiilerich.com>
date Mon, 14 Dec 2020 23:00:25 +0100
parents 1097603f5499
children 4f0de9468da3
files kallithea/lib/vcs/backends/git/repository.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/git/repository.py	Thu Nov 12 19:11:11 2020 +0100
+++ b/kallithea/lib/vcs/backends/git/repository.py	Mon Dec 14 23:00:25 2020 +0100
@@ -747,7 +747,7 @@
         url = self._get_url(url)
         so = self.run_git_command(['ls-remote', '-h', url])
         cmd = ['fetch', url, '--']
-        for line in (x for x in so.splitlines()):
+        for line in so.splitlines():
             sha, ref = line.split('\t')
             cmd.append('+%s:%s' % (ref, ref))
         self.run_git_command(cmd)