Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.99.3
Fetching contributors…

Cannot retrieve contributors at this time

file 39 lines (33 sloc) 0.625 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
/*
* GIT - The information manager from hell
*
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"

static void report(const char *prefix, const char *err, va_list params)
{
fputs(prefix, stderr);
vfprintf(stderr, err, params);
fputs("\n", stderr);
}

void usage(const char *err)
{
fprintf(stderr, "usage: %s\n", err);
exit(1);
}

void die(const char *err, ...)
{
va_list params;

va_start(params, err);
report("fatal: ", err, params);
va_end(params);
exit(1);
}

int error(const char *err, ...)
{
va_list params;

va_start(params, err);
report("error: ", err, params);
va_end(params);
return -1;
}
Something went wrong with that request. Please try again.