Reset --soft in the root
Using --hard checks out all the files. Not resetting fails tests.
This commit is contained in:
parent
bc865d0329
commit
5050413d09
|
|
@ -1111,7 +1111,8 @@ 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).
|
// Reset the root's rev (so we can prune and so we can rely on it later).
|
||||||
_, err = git.run.Run(ctx, git.root, nil, git.cmd, "reset", "--hard", hash, "--")
|
// Use --soft so we do not check out files into the root.
|
||||||
|
_, err = git.run.Run(ctx, git.root, nil, git.cmd, "reset", "--soft", hash, "--")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue