add some missing stuff

This commit is contained in:
2024-12-19 13:17:06 -06:00
parent 8089a46d50
commit 363f15abd3

9
XD.c
View File

@ -78,9 +78,8 @@ has_stashes(git_repository *repo)
e = git_reference_lookup(&stash, repo, "refs/stash");
if (e == GIT_ENOTFOUND) {
git_error_clear();
return 0;
} else if (e < GIT_OK) {
} else if (e < 0) {
L("Error looking up stash reference: %s", git_error_last()->message);
return 0;
} else {
@ -122,6 +121,12 @@ has_untracked(git_repository *repo)
return r;
}
/**
* @brief check for staged changes
*
* @param repo git repository object
* @return 1 if any staged changes found 0 otherwise
*/
int
has_staged(git_repository *repo)
{