Skip to content
Merged
Changes from all 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
4 changes: 2 additions & 2 deletions cmd/git-sync/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ func (git *repoSync) AddWorktreeAndSwap(ctx context.Context, hash string) error
}

// Reset the worktree's working copy to the specific rev.
_, err = runCommand(ctx, worktreePath, git.cmd, "reset", "--hard", hash)
_, err = runCommand(ctx, worktreePath, git.cmd, "reset", "--hard", hash, "--")
if err != nil {
return err
}
Expand Down Expand Up @@ -768,7 +768,7 @@ func (git *repoSync) AddWorktreeAndSwap(ctx context.Context, hash string) error
}

// Reset the root's rev (so we can prune and so we can rely on it later).
_, err = runCommand(ctx, git.root, git.cmd, "reset", "--hard", hash)
_, err = runCommand(ctx, git.root, git.cmd, "reset", "--hard", hash, "--")
if err != nil {
return err
}
Expand Down