summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-12-05 11:24:17 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-12-05 11:24:28 -0800
commitcd1c2e7301820f9a198c8d665cd72d930233d02a (patch)
treebae2ad03e1ca04c3168e2f4bc2db840b14bc043d /git.c
parentMerge branch 'tk/diffcore-delta-remove-unused' into maint (diff)
parentcommon-main: stop munging argv[0] path (diff)
downloadtgif-cd1c2e7301820f9a198c8d665cd72d930233d02a.tar.xz
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);