checkout: remove duplicate code
Both commit a7256debd4b6 ("checkout.txt: note about losing staged changes with --merge", 2019-03-19) from nd/checkout-m-doc-update and commit 6eff409e8a76 ("checkout: prevent losing staged changes with --merge", 2019-03-22) from nd/checkout-m were included in git.git despite the fact that the latter was meant to be v2 of the former. The merge of these two topics resulted in a redundant chunk of code; remove it. Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Aug 15, 2019 at 15:03 UTC
acb7da05ac86e81666d65249bfaf39cc125fb145
1 file changed
-7
builtin/checkout.c
-7
@@ -745,13 +745,6 @@ static int merge_working_tree(const struct checkout_opts *opts,
745
"the following files:\n%s"), sb.buf);
746
strbuf_release(&sb);
747
748
- if (repo_index_has_changes(the_repository,
749
- get_commit_tree(old_branch_info->commit),
750
- &sb))
751
- warning(_("staged changes in the following files may be lost: %s"),
752
- sb.buf);
753
- strbuf_release(&sb);
754
-
748
/* Do more real merge */
749
750
/*