* [PATCH] list_commands: only call git_exec_path if it is needed
@ 2008-08-28 17:19 Alex Riesen
0 siblings, 0 replies; only message in thread
From: Alex Riesen @ 2008-08-28 17:19 UTC (permalink / raw)
To: git; +Cc: Junio C Hamano
Even if it always needed
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
---
help.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/help.c b/help.c
index ab2c2ba..b278257 100644
--- a/help.c
+++ b/help.c
@@ -212,7 +212,6 @@ void load_command_list(const char *prefix,
void list_commands(const char *title, struct cmdnames *main_cmds,
struct cmdnames *other_cmds)
{
- const char *exec_path = git_exec_path();
int i, longest = 0;
for (i = 0; i < main_cmds->cnt; i++)
@@ -223,6 +222,7 @@ void list_commands(const char *title, struct cmdnames *main_cmds,
longest = other_cmds->names[i]->len;
if (main_cmds->cnt) {
+ const char *exec_path = git_exec_path();
printf("available %s in '%s'\n", title, exec_path);
printf("----------------");
mput_char('-', strlen(title) + strlen(exec_path));
--
1.6.0.1.150.g5966
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-28 17:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-28 17:19 [PATCH] list_commands: only call git_exec_path if it is needed Alex Riesen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).