restore if hard reset

This commit is contained in:
Martin Marmsoler 2023-02-07 19:37:54 +01:00
parent 48b5e85dc5
commit cae0ff2235

View File

@ -271,7 +271,8 @@ bool Commit::reset(git_reset_t type, const QStringList &paths) const {
Repository repo = this->repo();
int state = repo.state();
int error = git_reset(repo, d.data(), type, &opts);
emit repo.notifier()->referenceUpdated(repo.head(), true);
emit repo.notifier()->referenceUpdated(repo.head(),
type == git_reset_t::GIT_RESET_HARD);
if (repo.state() != state) {
Patch::clearConflictResolutions(repo);
emit repo.notifier()->stateChanged();