Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion src/install/repository.rs
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,21 @@ impl RepositoryExt for Repository {
&[folder_name.as_bytes()],
);

if let Err(err) = exec(env, &[b"git", b"-C", path, b"fetch", b"--quiet"]) {
// Bare clones have no fetch refspec; --prune clears refs renamed upstream.
if let Err(err) = exec(
env,
&[
b"git",
b"-C",
path,
b"fetch",
b"--quiet",
b"--prune",
b"origin",
Comment thread
claude[bot] marked this conversation as resolved.
Resolved
b"+refs/heads/*:refs/heads/*",
Comment thread
robobun marked this conversation as resolved.
Resolved
b"+refs/tags/*:refs/tags/*",
],
) {
Comment thread
robobun marked this conversation as resolved.
Resolved
log.add_error_fmt(
None,
bun_ast::Loc::EMPTY,
Expand Down Expand Up @@ -751,6 +765,9 @@ impl RepositoryExt for Repository {
b"core.longpaths=true",
b"--quiet",
b"--bare",
// The refresh fetches "origin" by name; ignore clone.defaultRemoteName.
b"-o",
b"origin",
url,
target,
],
Expand Down
Loading