mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 15:00:30 +03:00
Use origin/HEAD as the default checkout for git
This should fix many RepoManifest UCMs where 'master' is not the default branch
This commit is contained in:
parent
c9638cf7dd
commit
c0f026c9c4
1 changed files with 3 additions and 2 deletions
|
|
@ -436,8 +436,9 @@ class vcs_git(vcs):
|
|||
if p.returncode != 0:
|
||||
raise VCSException("Git fetch failed")
|
||||
self.refreshed = True
|
||||
# Check out the appropriate revision
|
||||
rev = str(rev if rev else 'origin/master')
|
||||
# origin/HEAD is the HEAD of the remote, e.g. the "default branch" on
|
||||
# a github repo. Most of the time this is the same as origin/master.
|
||||
rev = str(rev if rev else 'origin/HEAD')
|
||||
p = SilentPopen(['git', 'checkout', '-f', rev], cwd=self.local)
|
||||
if p.returncode != 0:
|
||||
raise VCSException("Git checkout failed")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue