remove now pointless 'check_disk' parameter of got_repo_map_path() suggested by naddy
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
diff --git a/got/got.c b/got/got.c
index dfa05ac..e0a4032 100644
--- a/got/got.c
+++ b/got/got.c
@@ -3853,7 +3853,7 @@ cmd_log(int argc, char *argv[])
}
} else
error = got_repo_map_path(&in_repo_path, repo,
- path ? path : "", 1);
+ path ? path : "");
if (error != NULL)
goto done;
if (in_repo_path) {
@@ -4526,7 +4526,7 @@ cmd_blame(int argc, char *argv[])
error = apply_unveil(got_repo_get_path(repo), 1, NULL);
if (error)
goto done;
- error = got_repo_map_path(&in_repo_path, repo, path, 1);
+ error = got_repo_map_path(&in_repo_path, repo, path);
}
if (error)
goto done;
@@ -4859,7 +4859,7 @@ cmd_tree(int argc, char *argv[])
goto done;
if (path == NULL)
path = "/";
- error = got_repo_map_path(&in_repo_path, repo, path, 1);
+ error = got_repo_map_path(&in_repo_path, repo, path);
if (error != NULL)
goto done;
}
diff --git a/include/got_repository.h b/include/got_repository.h
index 20f873a..9e816e2 100644
--- a/include/got_repository.h
+++ b/include/got_repository.h
@@ -105,7 +105,7 @@ int got_repo_is_bare(struct got_repository *);
/* Attempt to map an arbitrary path to a path within the repository. */
const struct got_error *got_repo_map_path(char **, struct got_repository *,
- const char *, int);
+ const char *);
/* Create a new repository in an empty directory at a specified path. */
const struct got_error *got_repo_init(const char *);
diff --git a/lib/repository.c b/lib/repository.c
index 6d8ef4d..dfc1bf5 100644
--- a/lib/repository.c
+++ b/lib/repository.c
@@ -762,7 +762,7 @@ got_repo_free_remote_repo_data(struct got_remote_repo *repo)
const struct got_error *
got_repo_map_path(char **in_repo_path, struct got_repository *repo,
- const char *input_path, int check_disk)
+ const char *input_path)
{
const struct got_error *err = NULL;
const char *repo_abspath = NULL;
@@ -782,7 +782,7 @@ got_repo_map_path(char **in_repo_path, struct got_repository *repo,
repo_abspath = got_repo_get_path(repo);
- if (!check_disk || canonpath[0] == '\0') {
+ if (canonpath[0] == '\0') {
path = strdup(canonpath);
if (path == NULL) {
err = got_error_from_errno("strdup");
diff --git a/tog/tog.c b/tog/tog.c
index 071cab5..ed5c1bc 100644
--- a/tog/tog.c
+++ b/tog/tog.c
@@ -2614,7 +2614,7 @@ get_in_repo_path_from_argv0(char **in_repo_path, int argc, char *argv[],
}
free(p);
} else
- err = got_repo_map_path(in_repo_path, repo, argv[0], 1);
+ err = got_repo_map_path(in_repo_path, repo, argv[0]);
return err;
}