git-query

git data extraction tool using c and libgit2

git clone https://9o.is/git/git-query.git

commit 4b7aa65460ce6b66b2dda0596a8a1dc2c3e0bf75
parent 68cb0d36e48d98a077689bb8af3ac1c46778db11
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Fri, 10 Nov 2017 20:53:46 +0100

more verbose errors: show which file failed on open

Diffstat:
Mstagit.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/stagit.c b/stagit.c @@ -223,7 +223,7 @@ efopen(const char *name, const char *flags) FILE *fp; if (!(fp = fopen(name, flags))) - err(1, "fopen"); + err(1, "fopen: '%s'", name); return fp; } @@ -1115,7 +1115,7 @@ main(int argc, char *argv[]) if ((fd = mkstemp(tmppath)) == -1) err(1, "mkstemp"); if (!(wcachefp = fdopen(fd, "w"))) - err(1, "fdopen"); + err(1, "fdopen: '%s'", tmppath); /* write last commit id (HEAD) */ git_oid_tostr(buf, sizeof(buf), head); fprintf(wcachefp, "%s\n", buf);