Commit Diff


commit - bfd61697d22df765ef7a98856bc68c4b19109c6e
commit + 8fa913ec61095de669c9ca40e3cd782d53c85bdc
blob - dfa05ac329c8db9c49e5d1927f7fdc88eebea2f5
blob + e0a40321232655aab2023084467d00ae612a4215
--- got/got.c
+++ 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;
 	}
blob - 20f873a5d4df17522f28c52407c564cdb5d0e583
blob + 9e816e247d7da758b11ef445bf1ee6274ee14726
--- include/got_repository.h
+++ 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 *);
blob - 6d8ef4d381dbaffd92e0c0addbe3c8d1567a43d2
blob + dfc1bf52869052e48db54b0fa8404e5c7f6b873d
--- lib/repository.c
+++ lib/repository.c
@@ -762,7 +762,7 @@ got_repo_free_remote_repo_data(struct got_remote_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_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");
blob - 071cab54671cf2507a4fa42a0469c6c1ced7df49
blob + ed5c1bcd6b0bf2c051b4462a2c75b7a3ed9ee102
--- tog/tog.c
+++ tog/tog.c
@@ -2614,7 +2614,7 @@ get_in_repo_path_from_argv0(char **in_repo_path, int a
 		}
 		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;
 }