commit - 9c177e8d04414b7be4a02d64ed06dcc402a7b0a8
commit + 10477b5aacb13088676c3bfd7e0fcc477ba2724e
blob - 402b1ccfef8728b954ba0339814fdc2e1b9c7ba4
blob + b0b449ab2c4db803b92e006427b500772b2d2e55
--- gotd/session.c
+++ gotd/session.c
const char *repo_path, struct imsg *imsg)
{
const struct got_error *err = NULL;
- struct got_repository *repo = NULL;
+ struct got_repository *repo = gotd_session.repo;
struct got_reference *ref = NULL;
struct gotd_imsg_ref_update iref;
struct got_object_id old_id, new_id;
return got_error_from_errno("strndup");
log_debug("updating ref %s for uid %d", refname, client->euid);
-
- err = got_repo_open(&repo, repo_path, NULL, NULL);
- if (err)
- goto done;
memcpy(old_id.sha1, iref.old_id, SHA1_DIGEST_LENGTH);
memcpy(new_id.sha1, iref.new_id, SHA1_DIGEST_LENGTH);
}
if (ref)
got_ref_close(ref);
- if (repo)
- got_repo_close(repo);
free(refname);
free(id);
return err;