commit b55e96cf8f2e45d9a12689ad41d08d426e9715a5 from: Martin Pieuchot date: Mon Jan 20 16:02:51 2020 UTC Remove redundant error check after got_object_id_by_path(). An error code is always returned when the oid is NULL. commit - a93813face580b1da5c73546b864c4ea6c7d3064 commit + b55e96cf8f2e45d9a12689ad41d08d426e9715a5 blob - c053c6171169b8e75845855b4a40ffb01a22a020 blob + 6b7a4b54db79905db7ddafca3be7bf1b07b8a978 --- got/got.c +++ got/got.c @@ -2639,11 +2639,7 @@ cmd_blame(int argc, char *argv[]) error = got_object_id_by_path(&obj_id, repo, commit_id, in_repo_path); if (error) - goto done; - if (obj_id == NULL) { - error = got_error(GOT_ERR_NO_OBJ); goto done; - } error = got_object_get_type(&obj_type, repo, obj_id); if (error) blob - 29fe34549ad3e8f46a02235eadb41701c94e22f1 blob + 6872cd369be3cb235e2eec27f69466fb53dd8fef --- tog/tog.c +++ tog/tog.c @@ -3635,8 +3635,6 @@ run_blame(struct tog_blame *blame, struct tog_view *vi err = got_object_id_by_path(&obj_id, repo, commit_id, path); if (err) return err; - if (obj_id == NULL) - return got_error(GOT_ERR_NO_OBJ); err = got_object_get_type(&obj_type, repo, obj_id); if (err)