commit - dfa5768dfba3067f15757fc77677e1ba43b33b57
commit + 4a962942057bae9fbd47916e75d554fb52e0ec37
blob - a2964284b0746b56e407422c9347f61ca66b475d
blob + 5ea76c0eefd10ebe0ddf57279275a15c27edd525
--- gotwebd/got_operations.c
+++ gotwebd/got_operations.c
error = got_error_from_errno("asprintf");
goto done;
}
-
- error = got_init_repo_commit(&repo_commit);
- if (error)
- goto done;
/*
* XXX: jumping directly to a commit id via
for (;;) {
if (limit_chk == ((limit * qs->page) - (limit - 1)) &&
- commit_found == 0 && repo_commit->commit_id != NULL) {
+ commit_found == 0 && repo_commit &&
+ repo_commit->commit_id != NULL) {
t->prev_id = strdup(repo_commit->commit_id);
if (t->prev_id == NULL) {
error = got_error_from_errno("strdup");
if (error)
goto done;
+ error = got_init_repo_commit(&repo_commit);
+ if (error)
+ goto done;
+
+ TAILQ_INSERT_TAIL(&t->repo_commits, repo_commit, entry);
+
error = got_get_repo_commit(c, repo_commit, commit,
&refs, id);
if (error)
continue;
}
}
-
- struct repo_commit *new_repo_commit = NULL;
- error = got_init_repo_commit(&new_repo_commit);
- if (error)
- goto done;
- TAILQ_INSERT_TAIL(&t->repo_commits, new_repo_commit, entry);
-
- error = got_get_repo_commit(c, new_repo_commit, commit,
- &refs, id);
- if (error)
- goto done;
-
free(id);
id = NULL;
*/
if (chk_next && (qs->action == BRIEFS ||
qs->action == COMMITS || qs->action == SUMMARY)) {
- t->next_id = strdup(new_repo_commit->commit_id);
+ t->next_id = strdup(repo_commit->commit_id);
if (t->next_id == NULL) {
error = got_error_from_errno("strdup");
goto done;
got_object_commit_close(commit);
commit = NULL;
}
- TAILQ_REMOVE(&t->repo_commits, new_repo_commit,
+ TAILQ_REMOVE(&t->repo_commits, repo_commit,
entry);
- gotweb_free_repo_commit(new_repo_commit);
+ gotweb_free_repo_commit(repo_commit);
goto done;
}
}
}
}
done:
- gotweb_free_repo_commit(repo_commit);
if (ref)
got_ref_close(ref);
if (commit)