summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-12-05 11:24:17 -0800
committerJunio C Hamano <gitster@pobox.com>2016-12-05 11:24:28 -0800
commitcd1c2e7301820f9a198c8d665cd72d930233d02a (patch)
treebae2ad03e1ca04c3168e2f4bc2db840b14bc043d /git.c
parent0a79ccaac7dcfaf93294979fd9608d0f95fd7a47 (diff)
parent6854a8f5c9ecf32f5bd85020e77d48d3ffdf48fc (diff)
downloadgit-cd1c2e7301820f9a198c8d665cd72d930233d02a.tar.gz
Merge branch 'jk/common-main' into maint-2.10
* jk/common-main: common-main: stop munging argv[0] path git-compat-util: move content inside ifdef/endif guards
Diffstat (limited to 'git.c')
-rw-r--r--git.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/git.c b/git.c
index f914490e14..7acf290e23 100644
--- a/git.c
+++ b/git.c
@@ -616,6 +616,11 @@ int cmd_main(int argc, const char **argv)
cmd = argv[0];
if (!cmd)
cmd = "git-help";
+ else {
+ const char *slash = find_last_dir_sep(cmd);
+ if (slash)
+ cmd = slash + 1;
+ }
trace_command_performance(argv);