* Scan the path for conflicts, do the "handle_path()" thing above, and
* return the number of conflict hunks found.
*/
- static int handle_file(struct index_state *istate, const char *path,
- unsigned char *sha1, const char *output)
-static int handle_file(const char *path, unsigned char *hash, const char *output)
++static int handle_file(struct index_state *istate,
++ const char *path, unsigned char *hash, const char *output)
{
int has_conflicts = 0;
struct rerere_io_file io;
* conflict ID. No need to write anything out
* yet.
*/
- ret = handle_file(r->index, path, sha1, NULL);
- ret = handle_file(path, hash, NULL);
++ ret = handle_file(r->index, path, hash, NULL);
if (ret != 0 && string_list_has_string(rr, path)) {
remove_variant(string_list_lookup(rr, path)->util);
string_list_remove(rr, path, 1);
return 0;
}
- static int handle_cache(struct index_state *istate, const char *path,
- unsigned char *sha1, const char *output)
-static int handle_cache(const char *path, unsigned char *hash, const char *output)
++static int handle_cache(struct index_state *istate,
++ const char *path, unsigned char *hash, const char *output)
{
mmfile_t mmfile[3] = {{NULL}};
mmbuffer_t result = {NULL, 0};
* Recreate the original conflict from the stages in the
* index and compute the conflict ID
*/
- ret = handle_cache(istate, path, sha1, NULL);
- ret = handle_cache(path, hash, NULL);
++ ret = handle_cache(istate, path, hash, NULL);
if (ret < 1)
return error(_("could not parse conflict hunks in '%s'"), path);
if (!has_rerere_resolution(id))
continue;
- handle_cache(istate, path, sha1, rerere_path(id, "thisimage"));
- handle_cache(path, hash, rerere_path(id, "thisimage"));
++ handle_cache(istate, path, hash, rerere_path(id, "thisimage"));
if (read_mmfile(&cur, rerere_path(id, "thisimage"))) {
free(cur.ptr);
error(_("failed to update conflicted state in '%s'"), path);
* conflict in the working tree, run us again to record
* the postimage.
*/
- handle_cache(istate, path, sha1, rerere_path(id, "preimage"));
- handle_cache(path, hash, rerere_path(id, "preimage"));
++ handle_cache(istate, path, hash, rerere_path(id, "preimage"));
fprintf_ln(stderr, _("Updated preimage for '%s'"), path);
/*