From b4b777949bda7c458d5a309bbcddd61be3254af6 Mon Sep 17 00:00:00 2001 From: Derrick Stolee Date: Mon, 30 Sep 2024 13:20:41 -0400 Subject: [PATCH] stash: use -f in checkout-index child process Signed-off-by: Derrick Stolee --- builtin/stash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin/stash.c b/builtin/stash.c index 8172a7308c98e3..e1a416e3df5833 100644 --- a/builtin/stash.c +++ b/builtin/stash.c @@ -401,7 +401,7 @@ static int restore_untracked(struct object_id *u_tree) child_process_init(&cp); cp.git_cmd = 1; - strvec_pushl(&cp.args, "checkout-index", "--all", NULL); + strvec_pushl(&cp.args, "checkout-index", "--all", "-f", NULL); strvec_pushf(&cp.env, "GIT_INDEX_FILE=%s", stash_index_path.buf);