Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'unpack-trees.c')
-rw-r--r--unpack-trees.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/unpack-trees.c b/unpack-trees.c
index 1fe3764f2b..02048dfdac 100644
--- a/unpack-trees.c
+++ b/unpack-trees.c
@@ -562,11 +562,11 @@ static int warn_conflicted_path(struct index_state *istate,
add_rejected_path(o, WARNING_SPARSE_UNMERGED_FILE, conflicting_path);
- /* Find out how many higher stage entries at same path */
- while (++count < istate->cache_nr &&
- !strcmp(conflicting_path,
- istate->cache[i+count]->name))
- /* do nothing */;
+ /* Find out how many higher stage entries are at same path */
+ while ((++count) + i < istate->cache_nr &&
+ !strcmp(conflicting_path, istate->cache[count + i]->name))
+ ; /* do nothing */
+
return count;
}