summaryrefslogtreecommitdiffstats
path: root/XD.c
diff options
context:
space:
mode:
Diffstat (limited to 'XD.c')
-rw-r--r--XD.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/XD.c b/XD.c
index d98af9f..31c1dd1 100644
--- a/XD.c
+++ b/XD.c
@@ -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)
{