Changeset - 9a2c0a067c6e
[Not reviewed]
default
0 1 0
Mads Kiilerich (mads) - 5 years ago 2020-12-14 23:00:25
mads@kiilerich.com
vcs: simplify for loop in git fetch
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/vcs/backends/git/repository.py
Show inline comments
 
@@ -744,13 +744,13 @@ class GitRepository(BaseRepository):
 
        """
 
        Tries to pull changes from external location.
 
        """
 
        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)
 

	
 
    def _update_server_info(self):
 
        """
0 comments (0 inline, 0 general)