Skip to content

Commit

Permalink
properly add origin/ to git-ref if needed (#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
adrpo committed Mar 29, 2024
1 parent 1f04a82 commit 9216f81
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.py
Expand Up @@ -410,6 +410,8 @@ def testHelloWorld(cmd):
refFilesGitTag = "origin/master"
if "git-ref" in c["referenceFiles"]:
refFilesGitTag = c["referenceFiles"]["git-ref"].strip()
if not refFilesGitTag.startswith("origin/"):
refFilesGitTag = 'origin/%s' % refFilesGitTag
if c["referenceFiles"]["destination"] in preparedReferenceDirs:
(c["referenceFiles"],c["referenceFilesURL"]) = preparedReferenceDirs[destination]
continue
Expand Down Expand Up @@ -439,8 +441,6 @@ def testHelloWorld(cmd):
file = open(os.path.join(destinationReal,".git", "info", "sparse-checkout"), "a")
file.write(c["referenceFiles"]["git-directory"].strip())
file.close()
# add orgin to the git-ref tag
refFilesGitTag = 'origin/%s' % refFilesGitTag
else:
# Clone
check_call_log(["git", "clone", giturl, destination], stderr=subprocess.STDOUT)
Expand Down

0 comments on commit 9216f81

Please sign in to comment.