diff options
author | Steffen Prohaska <prohaska@zib.de> | 2009-01-18 13:00:11 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-01-26 00:26:05 -0800 |
commit | 2cd72b0b290e40fb4d6a925ce26603503f01aa09 (patch) | |
tree | 6ef034279ded05faad660074fe3e5b5fff4dc70e /git.c | |
parent | 4dd47c3b867f51211d0dc4474dab0fee5ca614da (diff) | |
download | git-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.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -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"; /* |