summaryrefslogtreecommitdiff
path: root/git.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2016-11-29 12:22:13 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2016-11-29 12:22:13 -0800
commit95c2b13a5fc06db6556def93843653e948e71e4b (patch)
treef6f1b90a0ce387460e3bb28a6f0399666f14a9b1 /git.c
parentMerge tag 'l10n-2.11.0-rnd3.1' of git://github.com/git-l10n/git-po (diff)
parentcommon-main: stop munging argv[0] path (diff)
downloadtgif-95c2b13a5fc06db6556def93843653e948e71e4b.tar.xz
Merge branch 'jk/common-main'
Fix for a small regression in a topic already in 'master'. * jk/common-main: common-main: stop munging argv[0] path
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 e8b2baf2d1..dce529fcbf 100644
--- a/git.c
+++ b/git.c
@@ -654,6 +654,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);