mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
index: provide a index_options structure when opening
Instead of simply taking the oid type, future-proof our index opening and creation functionality by taking an options structure.
This commit is contained in:
@@ -31,7 +31,7 @@ int lg2_show_index(git_repository *repo, int argc, char **argv)
|
||||
dirlen = strlen(dir);
|
||||
if (dirlen > 5 && strcmp(dir + dirlen - 5, "index") == 0) {
|
||||
#ifdef GIT_EXPERIMENTAL_SHA256
|
||||
check_lg2(git_index_open(&index, dir, GIT_OID_SHA1), "could not open index", dir);
|
||||
check_lg2(git_index_open(&index, dir, NULL), "could not open index", dir);
|
||||
#else
|
||||
check_lg2(git_index_open(&index, dir), "could not open index", dir);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user