3 Commits
v2.0 ... v2.1

Author SHA1 Message Date
202142a8af fix segfault in certain situations do to missing arguments 2024-12-22 12:57:26 -05:00
6e5d8a1e6a reorder code 2024-12-22 12:56:47 -05:00
d1752c3ac7 bugfix
re enable mwindow size stuff due to divide by zero's happening on
larger repositories
2024-12-22 12:55:39 -05:00

6
XD.c
View File

@ -93,8 +93,6 @@ git_repository
/* disable a bunch of git options to hopefully speed things up */
git_libgit2_opts(GIT_OPT_ENABLE_CACHING, 0);
git_libgit2_opts(GIT_OPT_SET_MWINDOW_SIZE, 0);
git_libgit2_opts(GIT_OPT_SET_MWINDOW_MAPPED_LIMIT, 0);
git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_GLOBAL, "");
git_libgit2_opts(GIT_OPT_SET_SEARCH_PATH, GIT_CONFIG_LEVEL_XDG, "");
@ -191,8 +189,8 @@ has_staged(git_repository *repo)
git_status_options opts = GIT_STATUS_OPTIONS_INIT;
int i, c, r = 0;
opts.flags = GIT_STATUS_INDEX_NEW;
opts.show = GIT_STATUS_SHOW_INDEX_ONLY;
opts.flags = GIT_STATUS_INDEX_NEW;
if (git_status_list_new(&list, repo, &opts) < 0) {
L("Error checking for staged changes: %s", git_error_last()->message);
@ -224,7 +222,7 @@ main(int argc, char *argv[])
int code = -1;
/* print version information */
if (strcmp(argv[1], "-v") == 0) {
if (argc > 1 && strcmp(argv[1], "-v") == 0) {
printf("XD [number] v%s\n", VERSION);
return 0;
}