Compare commits
3 Commits
Author | SHA1 | Date | |
---|---|---|---|
202142a8af | |||
6e5d8a1e6a | |||
d1752c3ac7 |
6
XD.c
6
XD.c
@ -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;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user