{"thread":{"id":"15251","subject":"[PATCH] list_commands: only call git_exec_path if it is needed","startedAt":"2008-08-28T17:19:42Z","lastAt":"2008-08-28T17:19:42Z","messageCount":1,"participants":["Alex Riesen"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"88924","messageId":"20080828171942.GE6024@blimp.local","threadId":"15251","inReplyTo":null,"subject":"[PATCH] list_commands: only call git_exec_path if it is needed","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2008-08-28T17:19:42Z","receivedAt":"2008-08-28T17:19:42Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Even if it always needed\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n help.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/help.c b/help.c\nindex ab2c2ba..b278257 100644\n--- a/help.c\n+++ b/help.c\n@@ -212,7 +212,6 @@ void load_command_list(const char *prefix,\n void list_commands(const char *title, struct cmdnames *main_cmds,\n \t\t   struct cmdnames *other_cmds)\n {\n-\tconst char *exec_path = git_exec_path();\n \tint i, longest = 0;\n \n \tfor (i = 0; i < main_cmds->cnt; i++)\n@@ -223,6 +222,7 @@ void list_commands(const char *title, struct cmdnames *main_cmds,\n \t\t\tlongest = other_cmds->names[i]->len;\n \n \tif (main_cmds->cnt) {\n+\t\tconst char *exec_path = git_exec_path();\n \t\tprintf(\"available %s in '%s'\\n\", title, exec_path);\n \t\tprintf(\"----------------\");\n \t\tmput_char('-', strlen(title) + strlen(exec_path));\n-- \n1.6.0.1.150.g5966\n"}]}