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 /merge-recursive.c | |
parent | fb4c62235fee8008d99ef55c4adcb1f7ea9508a3 (diff) | |
download | git-fa2364ec3457cc107e47d617779f1ffa23647ca4.tar.gz |
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 'merge-recursive.c')
-rw-r--r-- | merge-recursive.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/merge-recursive.c b/merge-recursive.c index d8820604ca..33ba5dc07c 100644 --- a/merge-recursive.c +++ b/merge-recursive.c @@ -976,7 +976,7 @@ merge_file_special_markers(struct merge_options *o, return mfi; } -static struct merge_file_info merge_file(struct merge_options *o, +static struct merge_file_info merge_file_one(struct merge_options *o, const char *path, const unsigned char *o_sha, int o_mode, const unsigned char *a_sha, int a_mode, @@ -1166,7 +1166,7 @@ static void conflict_rename_rename_1to2(struct merge_options *o, struct merge_file_info mfi; struct diff_filespec other; struct diff_filespec *add; - mfi = merge_file(o, one->path, + mfi = merge_file_one(o, one->path, one->sha1, one->mode, a->sha1, a->mode, b->sha1, b->mode, @@ -1450,7 +1450,7 @@ static int process_renames(struct merge_options *o, ren1_dst, branch2); if (o->call_depth) { struct merge_file_info mfi; - mfi = merge_file(o, ren1_dst, null_sha1, 0, + mfi = merge_file_one(o, ren1_dst, null_sha1, 0, ren1->pair->two->sha1, ren1->pair->two->mode, dst_other.sha1, dst_other.mode, branch1, branch2); |