mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 00:36:51 +00:00
git-update: Don't try to pull --rebase repos that are not on master
This fixes updating of repos that are at a specific commit and a detached HEAD, such as openh264.
This commit is contained in:
parent
4525078098
commit
0f21cf4740
1 changed files with 7 additions and 0 deletions
|
@ -35,6 +35,13 @@ def update_subprojects(manifest, no_interaction=False):
|
|||
if not os.path.exists(os.path.join(repo_dir, '.git')):
|
||||
continue
|
||||
revision = repos_commits.get(repo_name)
|
||||
if not revision:
|
||||
# If we're on a detached head because the revision= value in the
|
||||
# wrap file is a commit, don't try to git pull --rebase because
|
||||
# that will always fail.
|
||||
ret = git('-C', repo_dir, 'rev-parse', '--symbolic-full-name', 'HEAD')
|
||||
if ret.strip() == 'HEAD':
|
||||
revision = git('rev-parse', 'HEAD').strip()
|
||||
if not update_repo(repo_name, repo_dir, revision, no_interaction):
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in a new issue