Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'builtin-checkout.c')
-rw-r--r--builtin-checkout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/builtin-checkout.c b/builtin-checkout.c
index c077134e62..1ea017f5f7 100644
--- a/builtin-checkout.c
+++ b/builtin-checkout.c
@@ -236,6 +236,8 @@ static int merge_working_tree(struct checkout_opts *opts,
topts.src_index = &the_index;
topts.dst_index = &the_index;
+ topts.msgs.not_uptodate_file = "You have local changes to '%s'; cannot switch branches.";
+
refresh_cache(REFRESH_QUIET);
if (unmerged_cache()) {
@@ -282,7 +284,7 @@ static int merge_working_tree(struct checkout_opts *opts,
* entries in the index.
*/
- add_files_to_cache(0, NULL, NULL);
+ add_files_to_cache(NULL, NULL, 0);
work = write_tree_from_memory();
ret = reset_to_new(new->commit->tree, opts->quiet);