workspace: explicit fetch right after bare clone (populates remote-tracking refs that --bare doesn't)
This commit is contained in:
parent
129d630391
commit
3578c9321b
1 changed files with 8 additions and 0 deletions
|
|
@ -106,6 +106,14 @@ class WorkspaceManager:
|
|||
["config", "remote.origin.fetch", "+refs/heads/*:refs/remotes/origin/*"],
|
||||
log_fh, cwd=str(paths.cache_dir),
|
||||
)
|
||||
# `git clone --bare` populates refs/heads/* but NOT
|
||||
# refs/remotes/origin/* — we need an explicit fetch to
|
||||
# materialize the remote-tracking refs the worktree-add
|
||||
# below will use.
|
||||
await _git(
|
||||
["fetch", "--prune", "origin", "+refs/heads/*:refs/remotes/origin/*"],
|
||||
log_fh, cwd=str(paths.cache_dir),
|
||||
)
|
||||
else:
|
||||
log_fh.write(f"[workspace] fetching latest into {paths.cache_dir}\n")
|
||||
log_fh.flush()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue