From f3c7ce2a05a8aa4efcfd1bdfdce6567d98f1cab7 Mon Sep 17 00:00:00 2001 From: Mathias Rasmussen Date: Sun, 7 Oct 2018 18:32:35 +0200 Subject: [PATCH] Fix #60002 Undo last commit: keep staged files --- extensions/git/src/git.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 0deb723c9d0..7d0f573b60c 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -1106,14 +1106,7 @@ export class Repository { } async reset(treeish: string, hard: boolean = false): Promise { - const args = ['reset']; - - if (hard) { - args.push('--hard'); - } - - args.push(treeish); - + const args = ['reset', hard ? '--hard' : '--soft', treeish]; await this.run(args); }