Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorSteffen Prohaska <prohaska@zib.de>2009-01-18 15:00:11 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-26 11:26:05 +0300
commit2cd72b0b290e40fb4d6a925ce26603503f01aa09 (patch)
tree6ef034279ded05faad660074fe3e5b5fff4dc70e /git.c
parent4dd47c3b867f51211d0dc4474dab0fee5ca614da (diff)
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";
/*