mirror of
https://github.com/git/git.git
synced 2024-11-17 22:44:49 +01:00
Merge branch 'jc/gitlink' into next
* jc/gitlink: read-tree: reorganize bind_merge code.
This commit is contained in:
commit
d882e1ac94
1 changed files with 6 additions and 6 deletions
12
read-tree.c
12
read-tree.c
|
@ -690,7 +690,7 @@ static int twoway_merge(struct cache_entry **src)
|
||||||
* Bind merge.
|
* Bind merge.
|
||||||
*
|
*
|
||||||
* Keep the index entries at stage0, collapse stage1 but make sure
|
* Keep the index entries at stage0, collapse stage1 but make sure
|
||||||
* stage0 does not have anything in prefix.
|
* stage0 does not have anything there.
|
||||||
*/
|
*/
|
||||||
static int bind_merge(struct cache_entry **src)
|
static int bind_merge(struct cache_entry **src)
|
||||||
{
|
{
|
||||||
|
@ -700,12 +700,12 @@ static int bind_merge(struct cache_entry **src)
|
||||||
if (merge_size != 1)
|
if (merge_size != 1)
|
||||||
return error("Cannot do a bind merge of %d trees\n",
|
return error("Cannot do a bind merge of %d trees\n",
|
||||||
merge_size);
|
merge_size);
|
||||||
if (!a)
|
if (a && old)
|
||||||
return merged_entry(old, NULL);
|
|
||||||
if (old)
|
|
||||||
die("Entry '%s' overlaps. Cannot bind.", a->name);
|
die("Entry '%s' overlaps. Cannot bind.", a->name);
|
||||||
|
if (!a)
|
||||||
return merged_entry(a, NULL);
|
return keep_entry(old);
|
||||||
|
else
|
||||||
|
return merged_entry(a, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in a new issue