remote: convert get_ref_match to take a struct refspec
[gitweb.git] / run-command.c
index 1301b878c7eece7031fb0c9795195435a89ce7a4..12c94c1dbe5a720a7581af81516b6884fc25d8d0 100644 (file)
@@ -1,6 +1,6 @@
 #include "cache.h"
 #include "run-command.h"
-#include "exec_cmd.h"
+#include "exec-cmd.h"
 #include "sigchain.h"
 #include "argv-array.h"
 #include "thread-utils.h"
@@ -621,7 +621,12 @@ static void trace_run_command(const struct child_process *cp)
        if (!trace_want(&trace_default_key))
                return;
 
-       strbuf_addf(&buf, "trace: run_command:");
+       strbuf_addstr(&buf, "trace: run_command:");
+       if (cp->dir) {
+               strbuf_addstr(&buf, " cd ");
+               sq_quote_buf_pretty(&buf, cp->dir);
+               strbuf_addch(&buf, ';');
+       }
        /*
         * The caller is responsible for initializing cp->env from
         * cp->env_array if needed. We only check one place.