mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
bugfix: checkout ref failed for origin branches
This commit is contained in:
parent
fc1b518ef7
commit
386c2a2322
@ -86,10 +86,17 @@ if __name__ == '__main__':
|
|||||||
for candidate in candidate_branches:
|
for candidate in candidate_branches:
|
||||||
# check if the branch, tag or commit exists
|
# check if the branch, tag or commit exists
|
||||||
try:
|
try:
|
||||||
subprocess.check_call(['git', 'cat-file', '-t', candidate], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
subprocess.check_call(['git', 'cat-file', '-t', 'origin/{}'.format(candidate)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
ref_to_use = candidate
|
ref_to_use = candidate
|
||||||
break
|
break
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
|
try:
|
||||||
|
# For customized commits
|
||||||
|
subprocess.check_call(['git', 'cat-file', '-t', candidate], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||||
|
ref_to_use = candidate
|
||||||
|
break
|
||||||
|
except subprocess.CalledProcessError:
|
||||||
|
pass
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if ref_to_use:
|
if ref_to_use:
|
||||||
|
Loading…
Reference in New Issue
Block a user