commit 644e44ed862856da15a694b4d3f52f4873f624a3 from: Stefan Sperling date: Sun Nov 04 15:40:28 2018 UTC remove some dead code commit - 18336eedac11f139b496ab3f1a16bbbc92652b76 commit + 644e44ed862856da15a694b4d3f52f4873f624a3 blob - 24ce3257675c611532e5fdb59eea01cece7c8f25 blob + ac9d7fa1d5cd2d6cb018d0686551d72ddf67dfaa --- lib/commit_graph.c +++ lib/commit_graph.c @@ -515,17 +515,15 @@ gather_branch_tips(struct got_object_id *id, void *dat } static const struct got_error * -fetch_commits_from_open_branches(int *ncommits, int *wanted_id_added, +fetch_commits_from_open_branches(int *ncommits, struct got_object_id **changed_id, struct got_commit_graph *graph, - struct got_repository *repo, struct got_object_id *wanted_id) + struct got_repository *repo) { const struct got_error *err; struct gather_branch_tips_arg arg; int i; *ncommits = 0; - if (wanted_id_added) - *wanted_id_added = 0; if (changed_id) *changed_id = NULL; @@ -585,8 +583,6 @@ fetch_commits_from_open_branches(int *ncommits, int *w break; if (new_node) (*ncommits)++; - if (wanted_id && got_object_id_cmp(commit_id, wanted_id) == 0) - *wanted_id_added = 1; } return err; @@ -601,8 +597,8 @@ got_commit_graph_fetch_commits(struct got_commit_graph struct got_object_id *changed_id = NULL; while (nfetched < limit) { - err = fetch_commits_from_open_branches(&ncommits, NULL, - &changed_id, graph, repo, NULL); + err = fetch_commits_from_open_branches(&ncommits, + &changed_id, graph, repo); if (err) return err; if (ncommits == 0) @@ -661,8 +657,8 @@ got_commit_graph_iter_start(struct got_commit_graph *g struct got_object_id *changed_id = NULL; while (changed_id == NULL) { int ncommits; - err = fetch_commits_from_open_branches(&ncommits, NULL, - &changed_id, graph, repo, NULL); + err = fetch_commits_from_open_branches(&ncommits, + &changed_id, graph, repo); if (err) { got_object_commit_close(commit); return err;