[PATCH] Fix git-diff-files for symlinks.
[alt-git.git] / usage.c
blobe774d2ef32726af0707d817cdb63fc8751ddc9d8
1 /*
2 * GIT - The information manager from hell
4 * Copyright (C) Linus Torvalds, 2005
5 */
6 #include <stdarg.h>
7 #include "cache.h"
9 static void report(const char *prefix, const char *err, va_list params)
11 fputs(prefix, stderr);
12 vfprintf(stderr, err, params);
13 fputs("\n", stderr);
16 void usage(const char *err)
18 fprintf(stderr, "usage: %s\n", err);
19 exit(1);
22 void die(const char *err, ...)
24 va_list params;
26 va_start(params, err);
27 report("fatal: ", err, params);
28 va_end(params);
29 exit(1);
32 int error(const char *err, ...)
34 va_list params;
36 va_start(params, err);
37 report("error: ", err, params);
38 va_end(params);
39 return -1;