Commit Diff


commit - ff21961dc4dad7f7d30223f9b6fbe38fa9ca0b3c
commit + b66cd6f325e3fa7ddd17ff6dd41cf6e59d04ebf5
blob - 822b842007562f4209e5385594554d50eb3be027
blob + a43dbc1f6911b315509559a874c7b729ba68d96f
--- lib/object.c
+++ lib/object.c
@@ -1664,7 +1664,7 @@ got_object_id_by_path(struct got_object_id **id, struc
 
 		te = find_entry_by_name(tree, seg, seglen);
 		if (te == NULL) {
-			err = got_error(GOT_ERR_NO_TREE_ENTRY);
+			err = got_error_path(path, GOT_ERR_NO_TREE_ENTRY);
 			goto done;
 		}
 
@@ -1690,7 +1690,7 @@ got_object_id_by_path(struct got_object_id **id, struc
 		if (*id == NULL)
 			return got_error_from_errno("got_object_id_dup");
 	} else
-		err = got_error(GOT_ERR_NO_TREE_ENTRY);
+		err = got_error_path(path, GOT_ERR_NO_TREE_ENTRY);
 done:
 	if (commit)
 		got_object_commit_close(commit);
blob - 6234533b470b15cee07c5edc3c6b9beb606bcda1
blob + b8408a749c9e5ff2c1983eb5d006ed171fdfb6e8
--- lib/repository.c
+++ lib/repository.c
@@ -1626,7 +1626,8 @@ write_tree(struct got_object_id **new_tree_id, const c
 	}
 
 	if (TAILQ_EMPTY(&paths)) {
-		err = got_error(GOT_ERR_NO_TREE_ENTRY);
+		err = got_error_msg(GOT_ERR_NO_TREE_ENTRY,
+		    "cannot create tree without any entries");
 		goto done;
 	}
 
blob - 0538db4eaaa0eac5a99d717327a150efac52b29b
blob + 61cc47cf16c65800bfc0db8525b875e9f2878054
--- lib/worktree.c
+++ lib/worktree.c
@@ -2537,7 +2537,7 @@ checkout_files(struct got_worktree *worktree, struct g
 
 	if (entry_name &&
 	    got_object_tree_find_entry(tree, entry_name) == NULL) {
-		err = got_error(GOT_ERR_NO_TREE_ENTRY);
+		err = got_error_path(entry_name, GOT_ERR_NO_TREE_ENTRY);
 		goto done;
 	}
 
@@ -4341,7 +4341,7 @@ revert_file(void *arg, unsigned char status, unsigned 
 		te = got_object_tree_find_entry(tree, te_name);
 		if (te == NULL && status != GOT_STATUS_ADD &&
 		    staged_status != GOT_STATUS_ADD) {
-			err = got_error(GOT_ERR_NO_TREE_ENTRY);
+			err = got_error_path(ie->path, GOT_ERR_NO_TREE_ENTRY);
 			goto done;
 		}
 	}
blob - 80b89ada1f0b16289f55b21fccf251a40d0bd17b
blob + 29f55aa5a7d96f3b060398ff0db5ae16d8e4f3e1
--- regress/cmdline/update.sh
+++ regress/cmdline/update.sh
@@ -1216,7 +1216,7 @@ function test_update_partial_rm {
 	(cd $testroot/repo && git rm -q alpha epsilon/zeta)
 	git_commit $testroot/repo -m "removed two files"
 
-	echo "got: no such entry found in tree" \
+	echo "got: /alpha: no such entry found in tree" \
 		> $testroot/stderr.expected
 
 	(cd $testroot/wt && got update alpha epsilon/zeta 2> $testroot/stderr)