commit - 5486daa23d45c65288ff2db5e09ec14956d2922a
commit + 7fbaa4f345d7c34db7ec62930b1d01fc3fbf0b32
blob - 8c16ff6563b96b1d3bc5fbef53e15bb1228b1c3b
blob + d07adf06cf9ef57d268916fd7e1b64d6e19d09ff
--- got/got.c
+++ got/got.c
} else
usage_checkout();
+ got_path_strip_trailing_slashes(repo_path);
got_path_strip_trailing_slashes(worktree_path);
error = got_repo_open(&repo, repo_path);
repo_path = realpath(optarg, NULL);
if (repo_path == NULL)
err(1, "-r option");
+ got_path_strip_trailing_slashes(repo_path);
break;
default:
usage_log();
repo_path = realpath(optarg, NULL);
if (repo_path == NULL)
err(1, "-r option");
+ got_path_strip_trailing_slashes(repo_path);
break;
default:
usage_diff();
repo_path = realpath(optarg, NULL);
if (repo_path == NULL)
err(1, "-r option");
+ got_path_strip_trailing_slashes(repo_path);
break;
default:
usage_blame();
repo_path = realpath(optarg, NULL);
if (repo_path == NULL)
err(1, "-r option");
+ got_path_strip_trailing_slashes(repo_path);
break;
case 'i':
show_ids = 1;
repo_path = realpath(optarg, NULL);
if (repo_path == NULL)
err(1, "-r option");
+ got_path_strip_trailing_slashes(repo_path);
break;
case 'l':
do_list = 1;
error = got_error_from_errno();
goto done;
}
+ got_path_strip_trailing_slashes(path);
cwd = getcwd(NULL, 0);
if (cwd == NULL) {
error = got_error_from_errno();
goto done;
}
+ got_path_strip_trailing_slashes(path);
cwd = getcwd(NULL, 0);
if (cwd == NULL) {
error = got_error_from_errno();
goto done;
}
+ got_path_strip_trailing_slashes(path);
cwd = getcwd(NULL, 0);
if (cwd == NULL) {
error = got_error_from_errno();
goto done;
}
+ got_path_strip_trailing_slashes(path);
} else if (argc != 0)
usage_commit();