4 Commits

Author SHA1 Message Date
6c099e3648 update man page to reflect passing in return codes 2024-12-22 13:01:45 -05:00
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
2 changed files with 3 additions and 5 deletions

2
XD.1
View File

@ -6,7 +6,7 @@
.Os .Os
.Sh SYNOPSIS .Sh SYNOPSIS
.Nm .Nm
.Op Fl v .Op Fl v|number
.Sh DESCRIPTION .Sh DESCRIPTION
.Nm .Nm
Displays information using a smiley face like so: :) Displays information using a smiley face like so: :)

6
XD.c
View File

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