Skip to content

Commit

Permalink
Merge pull request #430 from lsst-sqre/tickets/DM-46672/only-checkout…
Browse files Browse the repository at this point in the history
…-refs

DM-46672: always checkout refs, never files
  • Loading branch information
fajpunk authored Feb 25, 2025
2 parents 4897f45 + ed2a427 commit 2a71788
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/mobu/services/repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ async def clone(self, url: str, ref: str) -> ClonedRepoInfo:
git = Git(logger=self._logger)
git.repo = Path(repo_dir.name)
await git.clone(url, repo_dir.name)
await git.checkout(ref)

# trailing "--" means checkout a ref, not a file
await git.checkout(ref, "--")
repo_hash = await git.repo_hash()

# If we're in testing mode, record that we actually did a clone
Expand Down

0 comments on commit 2a71788

Please sign in to comment.