diff options
-rw-r--r-- | XD.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -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) { |