summaryrefslogtreecommitdiff
path: root/builtin/checkout.c
diff options
context:
space:
mode:
authorElijah Newren <newren@gmail.com>2019-08-15 22:03:03 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-08-16 16:58:00 (GMT)
commitacb7da05ac86e81666d65249bfaf39cc125fb145 (patch)
treed0de10963ea7acb22a4572962082bc5972506acc /builtin/checkout.c
parent4a3ed2bec6031545aea38db10e443a979951346f (diff)
downloadgit-acb7da05ac86e81666d65249bfaf39cc125fb145.zip
git-acb7da05ac86e81666d65249bfaf39cc125fb145.tar.gz
git-acb7da05ac86e81666d65249bfaf39cc125fb145.tar.bz2
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>
Diffstat (limited to 'builtin/checkout.c')
-rw-r--r--builtin/checkout.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/builtin/checkout.c b/builtin/checkout.c
index ffa776c..d75f69e 100644
--- a/builtin/checkout.c
+++ b/builtin/checkout.c
@@ -745,13 +745,6 @@ static int merge_working_tree(const struct checkout_opts *opts,
"the following files:\n%s"), sb.buf);
strbuf_release(&sb);
- if (repo_index_has_changes(the_repository,
- get_commit_tree(old_branch_info->commit),
- &sb))
- warning(_("staged changes in the following files may be lost: %s"),
- sb.buf);
- strbuf_release(&sb);
-
/* Do more real merge */
/*