commit f7b389259216725a5f122fbf01a6bbd685b96642 from: Stefan Sperling date: Sun Apr 01 18:40:35 2018 UTC make paths shown during checkout match what is created on disk commit - 2129468431e50164b67e02e0125a54a8216cec99 commit + f7b389259216725a5f122fbf01a6bbd685b96642 blob - fffacf8141f5666f4ba7e40767b33d337935d700 blob + 660a5a14f8b3ce44a6a8706bfe51b001b14a0419 --- got/got.c +++ got/got.c @@ -206,7 +206,7 @@ cmd_checkout(int argc, char *argv[]) free(cwd); } else if (argc == 2) { repo_path = argv[0]; - worktree_path = strdup(argv[1]); + worktree_path = realpath(argv[1], NULL); if (worktree_path == NULL) return got_error_from_errno(); } else blob - 80b9f971f82e444c5e97fda10624390229449f99 blob + a7d4b7d71eb224730c97b9f7a5d4e046a56101d9 --- lib/worktree.c +++ lib/worktree.c @@ -482,6 +482,7 @@ tree_checkout_entry(struct got_worktree *worktree, struct got_blob_object *blob = NULL; struct got_tree_object *tree = NULL; char *path = NULL; + char *progress_path = NULL; size_t len; if (parent[0] == '/' && parent[1] == '\0') @@ -500,7 +501,10 @@ tree_checkout_entry(struct got_worktree *worktree, if (err) goto done; - (*progress_cb)(progress_arg, path); + progress_path = path; + if (strncmp(progress_path, worktree->path_prefix, len) == 0) + progress_path += len; + (*progress_cb)(progress_arg, progress_path); switch (got_object_get_type(obj)) { case GOT_OBJ_TYPE_BLOB: