Re: [PATCH 2/3] am: do not corrupt the index stat state

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

 



David Aguilar <davvid@xxxxxxxxx> writes:

> Reported-by: Linus Torvalds
> Signed-off-by: David Aguilar <davvid@xxxxxxxxx>
> @@ -1975,10 +1977,20 @@ static int clean_index(const unsigned char *head, const unsigned char *remote)
>  
>  	memset(&pathspec, 0, sizeof(pathspec));
>  
> +	memset(&opts, 0, sizeof(opts));
> +	opts.fn = oneway_merge;
> +	opts.pathspec = &pathspec;
> +	opts.src_index = &the_index;
> +	opts.dst_index = &the_index;
> +	opts.head_idx = 1;
> +	opts.merge = 1;
> +	opts.reset = 1;
> +	init_tree_desc(&desc, remote_tree->buffer, remote_tree->size);
> +
>  	lock_file = xcalloc(1, sizeof(struct lock_file));
>  	hold_locked_index(lock_file, 1);
>  
> -	if (read_tree(remote_tree, 0, &pathspec)) {
> +	if (unpack_trees(1, &desc, &opts)) {

I think the same fix was done in 3ecc7040 (am --skip/--abort: merge
HEAD/ORIG_HEAD tree into index, 2015-08-19).
--
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]