summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorSteffen Prohaska <prohaska@zib.de>2009-01-18 13:00:11 +0100
committerJunio C Hamano <gitster@pobox.com>2009-01-26 00:26:05 -0800
commit2cd72b0b290e40fb4d6a925ce26603503f01aa09 (patch)
tree6ef034279ded05faad660074fe3e5b5fff4dc70e /git.c
parent4dd47c3b867f51211d0dc4474dab0fee5ca614da (diff)
downloadgit-2cd72b0b290e40fb4d6a925ce26603503f01aa09.tar.gz
git_extract_argv0_path(): Move check for valid argv0 from caller to callee
This simplifies the calling code. Signed-off-by: Steffen Prohaska <prohaska@zib.de> Acked-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git.c')
-rw-r--r--git.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/git.c b/git.c
index bf21e21cef..320cb43564 100644
--- a/git.c
+++ b/git.c
@@ -444,9 +444,8 @@ int main(int argc, const char **argv)
{
const char *cmd;
- if (argv[0] && *argv[0])
- cmd = git_extract_argv0_path(argv[0]);
- else
+ cmd = git_extract_argv0_path(argv[0]);
+ if (!cmd)
cmd = "git-help";
/*