summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2021-02-03 15:04:49 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-02-03 15:04:49 -0800
commit22f2bce6513aaf2aab4e9641bab8d16bbfc75048 (patch)
treed166358250857573b3eee5b105229525e75745b4
parentMerge branch 'jk/peel-iterated-oid' (diff)
parentrun-command: document use_shell option (diff)
downloadtgif-22f2bce6513aaf2aab4e9641bab8d16bbfc75048.tar.xz
Merge branch 'jk/run-command-use-shell-doc'
The .use_shell flag in struct child_process that is passed to run_command() API has been clarified with a bit more documentation. * jk/run-command-use-shell-doc: run-command: document use_shell option
-rw-r--r--run-command.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/run-command.h b/run-command.h
index 6472b38bde..d08414a92e 100644
--- a/run-command.h
+++ b/run-command.h
@@ -126,8 +126,15 @@ struct child_process {
*/
unsigned silent_exec_failure:1;
- unsigned stdout_to_stderr:1;
+ /**
+ * Run the command from argv[0] using a shell (but note that we may
+ * still optimize out the shell call if the command contains no
+ * metacharacters). Note that further arguments to the command in
+ * argv[1], etc, do not need to be shell-quoted.
+ */
unsigned use_shell:1;
+
+ unsigned stdout_to_stderr:1;
unsigned clean_on_exit:1;
unsigned wait_after_clean:1;
void (*clean_on_exit_handler)(struct child_process *process);