tree: provide some unsorted inputs for the tree updater
This makes sure we exercise the sorting that we need to do on the
inputs.
diff --git a/tests/object/tree/update.c b/tests/object/tree/update.c
index 54c4335..b38646a 100644
--- a/tests/object/tree/update.c
+++ b/tests/object/tree/update.c
@@ -147,8 +147,9 @@
git_index_entry entry = { {0} };
int i;
const char *paths[] = {
- "some/deep/path",
"some/other/path",
+ "some/deep/path",
+ "some/other/deep/path",
"a/path/elsewhere",
};
@@ -156,6 +157,7 @@
{ GIT_TREE_UPDATE_UPSERT, {{0}}, GIT_FILEMODE_BLOB, paths[0]},
{ GIT_TREE_UPDATE_UPSERT, {{0}}, GIT_FILEMODE_BLOB, paths[1]},
{ GIT_TREE_UPDATE_UPSERT, {{0}}, GIT_FILEMODE_BLOB, paths[2]},
+ { GIT_TREE_UPDATE_UPSERT, {{0}}, GIT_FILEMODE_BLOB, paths[3]},
};
cl_git_pass(git_oid_fromstr(&base_id, "c4dc1555e4d4fa0e0c9c3fc46734c7c35b3ce90b"));
@@ -179,7 +181,7 @@
cl_git_pass(git_index_read_tree(idx, base_tree));
}
- for (j = 0; j < 3; j++) {
+ for (j = 0; j < 4; j++) {
entry.path = paths[j];
cl_git_pass(git_index_add(idx, &entry));
}