mirror of
				https://github.com/f-droid/fdroidserver.git
				synced 2025-11-04 14:30:30 +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'):
 | 
					    def getref(self, revname='HEAD'):
 | 
				
			||||||
        self.checkrepo()
 | 
					        self.checkrepo()
 | 
				
			||||||
        p = FDroidPopen(['git', 'rev-parse', '--verify',
 | 
					        repo = git.Repo(self.local)
 | 
				
			||||||
                         '{revname}^{{commit}}'.format(revname=revname)], cwd=self.local,
 | 
					        if not repo.is_valid_object(revname):
 | 
				
			||||||
                        output=False)
 | 
					 | 
				
			||||||
        if p.returncode != 0:
 | 
					 | 
				
			||||||
            return None
 | 
					            return None
 | 
				
			||||||
        return p.output.strip()
 | 
					        return repo.commit(revname).hexsha
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
class vcs_gitsvn(vcs):
 | 
					class vcs_gitsvn(vcs):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue