X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=merge-recursive.c;h=db9ba19ddf94fec3a5cfff450b35f5bb7b46c35e;hb=08303c3636ef750bfafd1c47f363120cb439b367;hp=fb3c874ff47c949dc8df89edb320accf90bc8ac9;hpb=76a89d6d828486f96f42c69ef0cf87bb6b72fef5;p=git.git diff --git a/merge-recursive.c b/merge-recursive.c index fb3c874ff..db9ba19dd 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -273,7 +273,9 @@ static int save_files_dirs(const unsigned char *sha1, static int get_files_dirs(struct merge_options *o, struct tree *tree) { int n; - if (read_tree_recursive(tree, "", 0, 0, NULL, save_files_dirs, o)) + struct pathspec match_all; + init_pathspec(&match_all, NULL); + if (read_tree_recursive(tree, "", 0, 0, &match_all, save_files_dirs, o)) return 0; n = o->current_file_set.nr + o->current_directory_set.nr; return n; @@ -339,11 +341,10 @@ static void make_room_for_directories_of_df_conflicts(struct merge_options *o, * make room for the corresponding directory. Such paths will * later be processed in process_df_entry() at the end. If * the corresponding directory ends up being removed by the - * merge, then the file will be reinstated at that time - * (albeit with a different timestamp!); otherwise, if the - * file is not supposed to be removed by the merge, the - * contents of the file will be placed in another unique - * filename. + * merge, then the file will be reinstated at that time; + * otherwise, if the file is not supposed to be removed by the + * merge, the contents of the file will be placed in another + * unique filename. * * NOTE: This function relies on the fact that entries for a * D/F conflict will appear adjacent in the index, with the @@ -354,13 +355,6 @@ static void make_room_for_directories_of_df_conflicts(struct merge_options *o, int last_len = 0; int i; - /* - * Do not do any of this crazyness during the recursive; we don't - * even write anything to the working tree! - */ - if (o->call_depth) - return; - for (i = 0; i < entries->nr; i++) { const char *path = entries->items[i].string; int len = strlen(path); @@ -1263,13 +1257,9 @@ static int merge_content(struct merge_options *o, } if (mfi.clean && !df_conflict_remains && - sha_eq(mfi.sha, a_sha) && mfi.mode == a.mode && - !o->call_depth && !lstat(path, &st)) { + sha_eq(mfi.sha, a_sha) && mfi.mode == a.mode) output(o, 3, "Skipped %s (merged same as existing)", path); - add_cacheinfo(mfi.mode, mfi.sha, path, - 0 /*stage*/, 1 /*refresh*/, 0 /*options*/); - return mfi.clean; - } else + else output(o, 2, "Auto-merging %s", path); if (!mfi.clean) { @@ -1719,15 +1709,15 @@ int merge_recursive_generic(struct merge_options *o, static int merge_recursive_config(const char *var, const char *value, void *cb) { struct merge_options *o = cb; - if (!strcasecmp(var, "merge.verbosity")) { + if (!strcmp(var, "merge.verbosity")) { o->verbosity = git_config_int(var, value); return 0; } - if (!strcasecmp(var, "diff.renamelimit")) { + if (!strcmp(var, "diff.renamelimit")) { o->diff_rename_limit = git_config_int(var, value); return 0; } - if (!strcasecmp(var, "merge.renamelimit")) { + if (!strcmp(var, "merge.renamelimit")) { o->merge_rename_limit = git_config_int(var, value); return 0; }