Merge branch 'kb/perf-trace'
authorJunio C Hamano <gitster@pobox.com>
Fri, 19 Sep 2014 18:38:39 +0000 (11:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Fri, 19 Sep 2014 18:38:39 +0000 (11:38 -0700)
Compilation fix for some compilers.

* kb/perf-trace:
trace: correct trace_strbuf() parameter type for !HAVE_VARIADIC_MACROS

1  2 
trace.c
diff --combined trace.c
index 54aaee58183f880365caa1986824054a4533797e,17015fdb8142a70db00d80c111f0445a7bde9645..b6f25a23fdf8b6eec64181b5d6b56909bbe4ae7b
+++ b/trace.c
@@@ -216,7 -216,7 +216,7 @@@ void trace_argv_printf(const char **arg
        va_end(ap);
  }
  
- void trace_strbuf(const char *key, const struct strbuf *data)
+ void trace_strbuf(struct trace_key *key, const struct strbuf *data)
  {
        trace_strbuf_fl(NULL, 0, key, data);
  }
@@@ -298,12 -298,13 +298,12 @@@ void trace_repo_setup(const char *prefi
  {
        static struct trace_key key = TRACE_KEY_INIT(SETUP);
        const char *git_work_tree;
 -      char cwd[PATH_MAX];
 +      char *cwd;
  
        if (!trace_want(&key))
                return;
  
 -      if (!getcwd(cwd, PATH_MAX))
 -              die("Unable to get current working directory");
 +      cwd = xgetcwd();
  
        if (!(git_work_tree = get_git_work_tree()))
                git_work_tree = "(null)";
        trace_printf_key(&key, "setup: worktree: %s\n", quote_crnl(git_work_tree));
        trace_printf_key(&key, "setup: cwd: %s\n", quote_crnl(cwd));
        trace_printf_key(&key, "setup: prefix: %s\n", quote_crnl(prefix));
 +
 +      free(cwd);
  }
  
  int trace_want(struct trace_key *key)