Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 32 lines (23 sloc) 0.441 kb
7d5cce5 @schu Fiat Lux
authored
1
2 #include <stdio.h>
3 #include <stdlib.h>
4 #include <stdarg.h>
5
6 #include "common.h"
7
8 void NORETURN die(const char *err, ...)
9 {
10 va_list params;
11
12 va_start(params, err);
13 vfprintf(stderr, err, params);
14 fprintf(stderr, "\n");
15 va_end(params);
16
17 exit(128);
18 }
19
20 void NORETURN die_giterror()
21 {
e2304ab @schu util: return git error code
authored
22 int ret;
7d5cce5 @schu Fiat Lux
authored
23 const git_error *error;
24
a7380fc @schu util: update to latest error API
authored
25 error = giterr_last();
e2304ab @schu util: return git error code
authored
26 ret = error->klass;
7d5cce5 @schu Fiat Lux
authored
27 fprintf(stderr, "%s\n", error->message);
a7380fc @schu util: update to latest error API
authored
28 giterr_clear();
7d5cce5 @schu Fiat Lux
authored
29
e2304ab @schu util: return git error code
authored
30 exit(ret);
7d5cce5 @schu Fiat Lux
authored
31 }
Something went wrong with that request. Please try again.