diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-12-06 15:08:01 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-12-09 23:05:27 -0800 |
commit | fa2364ec3457cc107e47d617779f1ffa23647ca4 (patch) | |
tree | 0c40c2a03a8f65d5abf5b14c0b8a167ef7288b5b /builtin | |
parent | Merge branch 'mm/status-push-pull-advise' (diff) | |
download | tgif-fa2364ec3457cc107e47d617779f1ffa23647ca4.tar.xz |
Which merge_file() function do you mean?
There are two different static functions and one global function,
all of them called "merge_file()", with different signatures and
purposes. Rename them all to reduce confusion in "git grep" output:
* Rename the static one in merge-index to "merge_one_path(const char
*path)" as that function is about asking an external command to
resolve conflicts in one path.
* Rename the global one in merge-file.c that is only used by
merge-tree to "merge_blobs()", as the function takes three blobs and
returns the merged result only in-core, without doing anything to
the filesystem.
* Rename the one in merge-recursive to "merge_one_file()", just to be
fair.
Also rename merge-file.[ch] to merge-blobs.[ch].
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/merge-index.c | 4 | ||||
-rw-r--r-- | builtin/merge-tree.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/builtin/merge-index.c b/builtin/merge-index.c index 2338832587..be5e514324 100644 --- a/builtin/merge-index.c +++ b/builtin/merge-index.c @@ -42,7 +42,7 @@ static int merge_entry(int pos, const char *path) return found; } -static void merge_file(const char *path) +static void merge_one_path(const char *path) { int pos = cache_name_pos(path, strlen(path)); @@ -102,7 +102,7 @@ int cmd_merge_index(int argc, const char **argv, const char *prefix) } die("git merge-index: unknown option %s", arg); } - merge_file(arg); + merge_one_path(arg); } if (err && !quiet) die("merge program failed"); diff --git a/builtin/merge-tree.c b/builtin/merge-tree.c index 897a563bc6..ebd0d25db6 100644 --- a/builtin/merge-tree.c +++ b/builtin/merge-tree.c @@ -3,7 +3,7 @@ #include "xdiff-interface.h" #include "blob.h" #include "exec_cmd.h" -#include "merge-file.h" +#include "merge-blobs.h" static const char merge_tree_usage[] = "git merge-tree <base-tree> <branch1> <branch2>"; static int resolve_directories = 1; @@ -76,7 +76,7 @@ static void *result(struct merge_list *entry, unsigned long *size) their = NULL; if (entry) their = entry->blob; - return merge_file(path, base, our, their, size); + return merge_blobs(path, base, our, their, size); } static void *origin(struct merge_list *entry, unsigned long *size) |