t7610: run 'git reset --hard' after each test to clean up
[gitweb.git] / git.c
diff --git a/git.c b/git.c
index e8b2baf2d15c8a68553780c3137c55c3fea99b11..dce529fcbfd6e5d8526b0e88b43f6c568876ce9d 100644 (file)
--- 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);