Introduction
Introduction Statistics Contact Development Disclaimer Help
tstagit-index: continue making list, but return error code - stagit - static gi…
git clone git://src.adamsgaard.dk/stagit
Log
Files
Refs
README
LICENSE
---
commit a8943ce1f85bb1970b5fad3c91a514505da2946a
parent 35a3d9b3fc34b42506cea0fbdabaaa8fae6981a2
Author: Hiltjo Posthuma <[email protected]>
Date: Tue, 5 Jan 2016 22:30:59 +0100
stagit-index: continue making list, but return error code
Diffstat:
M stagit-index.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/stagit-index.c b/stagit-index.c
t@@ -169,7 +169,7 @@ main(int argc, char *argv[])
const git_error *e = NULL;
FILE *fp;
char path[PATH_MAX], *p;
- int i, status;
+ int i, ret = 0;
if (argc < 2) {
fprintf(stderr, "%s [repodir...]\n", argv[0]);
t@@ -182,11 +182,12 @@ main(int argc, char *argv[])
for (i = 1; i < argc; i++) {
repodir = argv[i];
- if ((status = git_repository_open_ext(&repo, repodir,
- GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) < 0) {
+ if (git_repository_open_ext(&repo, repodir,
+ GIT_REPOSITORY_OPEN_NO_SEARCH, NULL)) {
e = giterr_last();
- fprintf(stderr, "error %d/%d: %s\n", status, e->klass,…
- return status;
+ fprintf(stderr, "%s: %s\n", argv[0], e->message);
+ ret = 1;
+ continue;
}
/* use directory name as name */
t@@ -232,5 +233,5 @@ main(int argc, char *argv[])
git_repository_free(repo);
git_libgit2_shutdown();
- return 0;
+ return ret;
}
You are viewing proxied material from mx1.adamsgaard.dk. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.