Merge branch 'jc/unpack-trees-reword'
authorJunio C Hamano <gitster@pobox.com>
Sun, 25 May 2008 20:38:27 +0000 (13:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Sun, 25 May 2008 20:38:27 +0000 (13:38 -0700)
* jc/unpack-trees-reword:
unpack-trees: allow Porcelain to give different error messages

1  2 
builtin-checkout.c
diff --combined builtin-checkout.c
index 05c06421b6c3a6d75b598e3c58a40c8461febd75,83da7ca9ffae6a7fae94fcd012078bdec36ed72e..68fffd28cb636d115ed4491b55ce3b87d0b97109
@@@ -236,6 -236,8 +236,8 @@@ static int merge_working_tree(struct ch
                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()) {
                         * 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);