summaryrefslogtreecommitdiff
path: root/run-command.h
diff options
context:
space:
mode:
authorLibravatar Johannes Schindelin <johannes.schindelin@gmx.de>2021-09-09 09:47:05 +0000
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-09-09 12:56:11 -0700
commit3322a9d87f3b2121d2c62096f9261c8934c74056 (patch)
tree25f89bc60a594e13a680bb9ccc290fe877e16827 /run-command.h
parentpull: release packs before fetching (diff)
downloadtgif-3322a9d87f3b2121d2c62096f9261c8934c74056.tar.xz
run-command: prettify the `RUN_COMMAND_*` flags
The values were listed unaligned, and with powers of two spelled out in decimal. The list is easier to parse for human readers if the numbers are aligned and spelled out as powers of two (using the bit-shift operator `<<`). While at it, remove a code comment that was unclear at best, and confusing at worst. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.h')
-rw-r--r--run-command.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/run-command.h b/run-command.h
index af1296769f..3893193f32 100644
--- a/run-command.h
+++ b/run-command.h
@@ -233,13 +233,13 @@ int run_hook_ve(const char *const *env, const char *name, va_list args);
*/
int run_auto_maintenance(int quiet);
-#define RUN_COMMAND_NO_STDIN 1
-#define RUN_GIT_CMD 2 /*If this is to be git sub-command */
-#define RUN_COMMAND_STDOUT_TO_STDERR 4
-#define RUN_SILENT_EXEC_FAILURE 8
-#define RUN_USING_SHELL 16
-#define RUN_CLEAN_ON_EXIT 32
-#define RUN_WAIT_AFTER_CLEAN 64
+#define RUN_COMMAND_NO_STDIN (1<<0)
+#define RUN_GIT_CMD (1<<1)
+#define RUN_COMMAND_STDOUT_TO_STDERR (1<<2)
+#define RUN_SILENT_EXEC_FAILURE (1<<3)
+#define RUN_USING_SHELL (1<<4)
+#define RUN_CLEAN_ON_EXIT (1<<5)
+#define RUN_WAIT_AFTER_CLEAN (1<<6)
/**
* Convenience functions that encapsulate a sequence of