mirror of
https://github.com/martinvonz/jj.git
synced 2024-12-24 12:48:55 +00:00
parent
3090adfd5c
commit
2834b37888
1 changed files with 2 additions and 0 deletions
|
@ -969,6 +969,8 @@ pub fn reset_head(
|
|||
};
|
||||
if !skip_reset {
|
||||
git_repo.reset(new_git_commit.as_object(), git2::ResetType::Mixed, None)?;
|
||||
// Refresh the index since some scripts expect that.
|
||||
git_repo.index()?.update_all(["."], None)?;
|
||||
}
|
||||
} else {
|
||||
// Can't detach HEAD without a commit. Use placeholder ref to nullify the HEAD.
|
||||
|
|
Loading…
Reference in a new issue