Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
run-command.c: print new cwd in trace_run_command()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Thu, 18 Jan 2018 09:45:12 +0000
(16:45 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Fri, 19 Jan 2018 18:49:20 +0000
(10:49 -0800)
If a command sets a new env variable GIT_DIR=.git, we need more context
to know where that '.git' is related to.
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
run-command.c
patch
|
blob
|
history
raw
|
patch
| inline |
side by side
(parent:
c61a975
)
diff --git
a/run-command.c
b/run-command.c
index 1301b878c7eece7031fb0c9795195435a89ce7a4..a483d5904a3ec1acae8908dd2e699fa00bcaaa9d 100644
(file)
--- a/
run-command.c
+++ b/
run-command.c
@@
-622,6
+622,11
@@
static void trace_run_command(const struct child_process *cp)
return;
strbuf_addf(&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.