In a future commit, we will reuse these options for the index merge of
"apply --index", not just for the worktree.
Signed-off-by: D. Ben Knoble <redacted>
---
builtin/stash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/builtin/stash.c b/builtin/stash.c
index dfea2d2c4c..043a38cc6d 100644
--- a/builtin/stash.c
+++ b/builtin/stash.c
@@ -664,6 +664,8 @@ static enum stash_apply_result do_apply_stash(const char *prefix,
repo_get_index_file(the_repository), 0, NULL))
return error(_("cannot apply a stash in the middle of a merge"));
+ init_ui_merge_options(&o, the_repository);
+
if (index) {
if (oideq(&info->b_tree, &info->i_tree) ||
oideq(&c_tree, &info->i_tree)) {@@ -695,8 +697,6 @@ static enum stash_apply_result do_apply_stash(const char *prefix,
}
}
- init_ui_merge_options(&o, the_repository);
-
o.branch1 = label_ours ? label_ours : "Updated upstream";
o.branch2 = label_theirs ? label_theirs : "Stashed changes";
o.ancestor = label_base ? label_base : "Stash base";
--
2.56.0.rc1.315.gc6ed9934b7.dirty