summaryrefslogtreecommitdiff
path: root/rerere.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2018-09-21 15:57:27 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-09-21 16:48:10 (GMT)
commit32eaa4688387d37398f0bc498335355a28efb0c7 (patch)
treecef97cc234d7958b4c20d34e272baacdcc15ca48 /rerere.c
parent5adbb403c24880b758149378bc7874d7617db4bc (diff)
downloadgit-32eaa4688387d37398f0bc498335355a28efb0c7.zip
git-32eaa4688387d37398f0bc498335355a28efb0c7.tar.gz
git-32eaa4688387d37398f0bc498335355a28efb0c7.tar.bz2
ll-merge.c: remove implicit dependency on the_index
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'rerere.c')
-rw-r--r--rerere.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/rerere.c b/rerere.c
index c7787aa..e65d8fc 100644
--- a/rerere.c
+++ b/rerere.c
@@ -478,7 +478,7 @@ static int handle_file(const char *path, unsigned char *sha1, const char *output
{
int hunk_no = 0;
struct rerere_io_file io;
- int marker_size = ll_merge_marker_size(path);
+ int marker_size = ll_merge_marker_size(&the_index, path);
memset(&io, 0, sizeof(io));
io.io.getline = rerere_file_getline;
@@ -641,7 +641,8 @@ static int try_merge(const struct rerere_id *id, const char *path,
* A three-way merge. Note that this honors user-customizable
* low-level merge driver settings.
*/
- ret = ll_merge(result, path, &base, NULL, cur, "", &other, "", NULL);
+ ret = ll_merge(result, path, &base, NULL, cur, "", &other, "",
+ &the_index, NULL);
free(base.ptr);
free(other.ptr);
@@ -960,7 +961,7 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu
const struct cache_entry *ce;
int pos, len, i, hunk_no;
struct rerere_io_mem io;
- int marker_size = ll_merge_marker_size(path);
+ int marker_size = ll_merge_marker_size(&the_index, path);
/*
* Reproduce the conflicted merge in-core
@@ -995,7 +996,8 @@ static int handle_cache(const char *path, unsigned char *sha1, const char *outpu
*/
ll_merge(&result, path, &mmfile[0], NULL,
&mmfile[1], "ours",
- &mmfile[2], "theirs", NULL);
+ &mmfile[2], "theirs",
+ &the_index, NULL);
for (i = 0; i < 3; i++)
free(mmfile[i].ptr);