commit aa9f82475eebfaca6496836e1a4650f9c72c7567 from: Stefan Sperling date: Mon Aug 05 08:45:52 2019 UTC simplify a block of code in check_out_of_date() commit - fef8a0d35aef389b73d4ae528f0069a567997a7d commit + aa9f82475eebfaca6496836e1a4650f9c72c7567 blob - d52d55ec691b7403e0f094e701a8449ef30e216a blob + 3619401e92862964875e0fa4ba3df0cbf4c37bf4 --- lib/worktree.c +++ lib/worktree.c @@ -3459,9 +3459,8 @@ check_out_of_date(const char *in_repo_path, unsigned c err = got_object_id_by_path(&id, repo, head_commit_id, in_repo_path); if (err) { - if (err->code != GOT_ERR_NO_TREE_ENTRY) - goto done; - err = got_error(ood_errcode); + if (err->code == GOT_ERR_NO_TREE_ENTRY) + err = got_error(ood_errcode); goto done; } else if (got_object_id_cmp(id, base_blob_id) != 0) err = got_error(ood_errcode);