mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 06:30:27 +03:00 
			
		
		
		
	Merge branch 'fix_getref' into 'master'
git.getref: use python-git See merge request fdroid/fdroidserver!1186
This commit is contained in:
		
						commit
						5e31f23a96
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1252,12 +1252,10 @@ class vcs_git(vcs):
 | 
			
		|||
 | 
			
		||||
    def getref(self, revname='HEAD'):
 | 
			
		||||
        self.checkrepo()
 | 
			
		||||
        p = FDroidPopen(['git', 'rev-parse', '--verify',
 | 
			
		||||
                         '{revname}^{{commit}}'.format(revname=revname)], cwd=self.local,
 | 
			
		||||
                        output=False)
 | 
			
		||||
        if p.returncode != 0:
 | 
			
		||||
        repo = git.Repo(self.local)
 | 
			
		||||
        if not repo.is_valid_object(revname):
 | 
			
		||||
            return None
 | 
			
		||||
        return p.output.strip()
 | 
			
		||||
        return repo.commit(revname).hexsha
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class vcs_gitsvn(vcs):
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue