Re: [PATCH 6/8] apply: fall back on three-way merge

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Junio C Hamano <gitster@xxxxxxxxx> writes:

> +	/* Preimage the patch was prepared for */
> +	if (get_sha1(patch->old_sha1_prefix, pre_sha1) ||
> +	    read_blob_object(&buf, pre_sha1, patch->old_mode))
> +		return error("repository lacks necessary blobs to fall back on 3-way merge.");

What happens if there are multiple objects for the same pre_sha1? It's
just 7 characters, so conflicts are unlikely but possible. Ideally, we
could try applying the patch to all the blobs having the same prefix
sha1, and take the first one for which the patch applies cleanly.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]