Code

git add: trivial codestyle cleanup
[git.git] / imap-send.c
index 3703dbd1af65c30806a98f0d2d3dc14b8b0e9798..f91293c23f2bcb6d673e0316cd3736fdddd0fbe4 100644 (file)
@@ -23,6 +23,7 @@
  */
 
 #include "cache.h"
+#include "exec_cmd.h"
 #ifdef NO_OPENSSL
 typedef void *SSL;
 #endif
@@ -115,9 +116,9 @@ static int nfvasprintf(char **strp, const char *fmt, va_list ap)
 
        len = vsnprintf(tmp, sizeof(tmp), fmt, ap);
        if (len < 0)
-               die("Fatal: Out of memory\n");
+               die("Fatal: Out of memory");
        if (len >= sizeof(tmp))
-               die("imap command overflow !\n");
+               die("imap command overflow!");
        *strp = xmemdupz(tmp, len);
        return len;
 }
@@ -482,7 +483,7 @@ static int nfsnprintf(char *buf, int blen, const char *fmt, ...)
 
        va_start(va, fmt);
        if (blen <= 0 || (unsigned)(ret = vsnprintf(buf, blen, fmt, va)) >= (unsigned)blen)
-               die("Fatal: buffer too small. Please report a bug.\n");
+               die("Fatal: buffer too small. Please report a bug.");
        va_end(va);
        return ret;
 }
@@ -1389,6 +1390,8 @@ int main(int argc, char **argv)
        int total, n = 0;
        int nongit_ok;
 
+       git_extract_argv0_path(argv[0]);
+
        /* init the random number generator */
        arc4_init();