commit - a837b5e488f7dbfbb1e161c9583b4b76b473fe62
commit + 6dd1ece69a673273a872d5fb39eb97fc593a6f47
blob - 7f69adc6bdcc1004a041b2db8b490ff9f5e33bcb
blob + c6bef75ef4884567711056ca5c12f1bb477c78b1
--- lib/object.c
+++ lib/object.c
struct got_object_id id;
if (!got_parse_sha1_digest(id.sha1, id_str))
- return got_error(GOT_ERR_BAD_OBJ_ID_STR);
+ return got_error_path(id_str, GOT_ERR_BAD_OBJ_ID_STR);
return got_object_open(obj, repo, &id);
}
blob - f4d09931a07992b989e1780e9a1409217e137e08
blob + fb5f114d8a5ce54615d80a1f1a73b8ab0dc65a9a
--- lib/pack.c
+++ lib/pack.c
SIMPLEQ_INIT(matched_ids);
if (prefix_len < 2)
- return got_error(GOT_ERR_BAD_OBJ_ID_STR);
+ return got_error_path(id_str_prefix, GOT_ERR_BAD_OBJ_ID_STR);
hex[0] = id_str_prefix[0];
hex[1] = id_str_prefix[1];
hex[2] = '\0';
if (!got_parse_xdigit(&id0, hex))
- return got_error(GOT_ERR_BAD_OBJ_ID_STR);
+ return got_error_path(id_str_prefix, GOT_ERR_BAD_OBJ_ID_STR);
i = betoh32(packidx->hdr.fanout_table[id0 - 1]);
if (i == 0)
blob - 23d2de6e5badeeea7cfc1c110b9fb25e74400b95
blob + 9dffdcd83aa6b08ebbb5d3c8526500f507c72877
--- lib/repository.c
+++ lib/repository.c
for (i = 0; i < strlen(id_str_prefix); i++) {
if (isxdigit((unsigned char)id_str_prefix[i]))
continue;
- return got_error(GOT_ERR_BAD_OBJ_ID_STR);
+ return got_error_path(id_str_prefix, GOT_ERR_BAD_OBJ_ID_STR);
}
len = strlen(id_str_prefix);
goto done;
}
} else {
- err = got_error(GOT_ERR_BAD_OBJ_ID_STR);
+ err = got_error_path(id_str_prefix, GOT_ERR_BAD_OBJ_ID_STR);
goto done;
}
done:
blob - 78201506bd3635cf27a885f9e35fc7c49027ff38
blob + e841520c6fbc877de575ee04d69018206ea0391f
--- lib/worktree.c
+++ lib/worktree.c
char id_str[SHA1_DIGEST_STRING_LENGTH];
if (got_sha1_digest_to_str(ie->commit_sha1, id_str,
sizeof(id_str)) == NULL) {
- err = got_error(GOT_ERR_BAD_OBJ_ID_STR);
+ err = got_error_path(id_str,
+ GOT_ERR_BAD_OBJ_ID_STR);
goto done;
}
if (asprintf(&label_orig, "%s: commit %s",