Skip to content

Commit 3322a9d

Browse files
dschogitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 7e44ff7 commit 3322a9d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

run-command.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -233,13 +233,13 @@ int run_hook_ve(const char *const *env, const char *name, va_list args);
233233
*/
234234
int run_auto_maintenance(int quiet);
235235

236-
#define RUN_COMMAND_NO_STDIN 1
237-
#define RUN_GIT_CMD 2 /*If this is to be git sub-command */
238-
#define RUN_COMMAND_STDOUT_TO_STDERR 4
239-
#define RUN_SILENT_EXEC_FAILURE 8
240-
#define RUN_USING_SHELL 16
241-
#define RUN_CLEAN_ON_EXIT 32
242-
#define RUN_WAIT_AFTER_CLEAN 64
236+
#define RUN_COMMAND_NO_STDIN (1<<0)
237+
#define RUN_GIT_CMD (1<<1)
238+
#define RUN_COMMAND_STDOUT_TO_STDERR (1<<2)
239+
#define RUN_SILENT_EXEC_FAILURE (1<<3)
240+
#define RUN_USING_SHELL (1<<4)
241+
#define RUN_CLEAN_ON_EXIT (1<<5)
242+
#define RUN_WAIT_AFTER_CLEAN (1<<6)
243243

244244
/**
245245
* Convenience functions that encapsulate a sequence of

0 commit comments

Comments
 (0)