commit - c3022ba5fc09b6badac00b8c123aad9d45c2e039
commit + a2e6d162caba0a6b53c45162781de0cdbcae825a
blob - 83d8f86ea4a8f8daabf5d1314c75043ffc586117
blob + cbb8b461c91f58ff1ed7e56ea8b4439f80722191
--- lib/worktree.c
+++ lib/worktree.c
fd = open(path, O_RDONLY | O_NOFOLLOW);
if (fd == -1) {
if (errno == ENOENT)
- err = got_error(GOT_ERR_WORKTREE_META);
+ err = got_error_path(path, GOT_ERR_WORKTREE_META);
else
err = got_error_from_errno2("open", path);
goto done;
n = read(fd, *content, sb.st_size);
if (n != sb.st_size) {
err = (n == -1 ? got_error_from_errno2("read", path) :
- got_error(GOT_ERR_WORKTREE_META));
+ got_error_path(path, GOT_ERR_WORKTREE_META));
goto done;
}
if ((*content)[sb.st_size - 1] != '\n') {
- err = got_error(GOT_ERR_WORKTREE_META);
+ err = got_error_path(path, GOT_ERR_WORKTREE_META);
goto done;
}
(*content)[sb.st_size - 1] = '\0';
version = strtonum(formatstr, 1, INT_MAX, &errstr);
if (errstr) {
- err = got_error(GOT_ERR_WORKTREE_META);
+ err = got_error_msg(GOT_ERR_WORKTREE_META,
+ "could not parse work tree format version number");
goto done;
}
if (version != GOT_WORKTREE_FORMAT_VERSION) {