Commit Diff


commit - b90deaa1e76f50309d3cada092bfdc25edefa9a2
commit + 987345dd45ca55631b6ff88fcb12f1169d8f2671
blob - 04a5cf5f91675b465d65d9d78cbf8957f579950c
blob + 89c1db0265cddee3e6a28055bf6f362042c982f0
--- lib/repository.c
+++ lib/repository.c
@@ -1236,7 +1236,6 @@ write_tree(struct got_object_id **new_tree_id, const c
 	struct got_tree_entry *new_te = NULL;
 	struct got_pathlist_head paths;
 	struct got_pathlist_entry *pe;
-	char *name;
 
 	*new_tree_id = NULL;
 
@@ -1299,12 +1298,6 @@ write_tree(struct got_object_id **new_tree_id, const c
 			goto done;
 	}
 
-	name = basename(path_dir);
-	if (name == NULL) {
-		err = got_error_from_errno("basename");
-		goto done;
-	}
-
 	err = got_object_tree_create(new_tree_id, &new_tree_entries, repo);
 done:
 	if (dir)