提交 278842c9 编写于 作者: R Ryuichi Inagaki

ref #44776 deleteRef instead of reset if commit has no parents

上级 81b3b444
......@@ -1123,7 +1123,12 @@ export class CommandCenter {
}
const commit = await repository.getCommit('HEAD');
await repository.reset('HEAD~');
if (commit.previousHashes.length > 0) {
await repository.reset('HEAD~');
} else {
await repository.deleteRef('HEAD');
await this.unstageAll(repository);
}
repository.inputBox.value = commit.message;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册