Commit Diff


commit - c3754a5ba7f662b92fd96c944a28356b487c73b5
commit + 797eca751ecaa0175aabbad1ac06381e10d5366e
blob - 4521a0c515bb4aa2c6c59fa451dd249093a18667
blob + c3c906849a7cb1a5a9b22984d8b81bd346aa6bd1
--- lib/worktree.c
+++ lib/worktree.c
@@ -2482,15 +2482,6 @@ match_modified_subtree(int *modified, struct got_tree_
 
 	TAILQ_FOREACH(pe, commitable_paths, entry) {
 		struct commitable *ct = pe->data;
-		char *ct_path;
-
-		if (asprintf(&ct_path, "%s%s%s", base_tree_path,
-		    got_path_is_root_dir(base_tree_path) ? "" : "/",
-		    te->name) == -1) {
-			err = got_error_from_errno();
-			break;
-		}
-
 		*modified = got_path_is_child(ct->in_repo_path, te_path,
 		    strlen(te_path));
 		 if (*modified)