summaryrefslogtreecommitdiff
path: root/sequencer.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-04-30 00:51:30 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-04-30 00:51:30 (GMT)
commit6a8989709efbd6d5187005497907264fde026ae9 (patch)
tree9a575ab5e173c5e5f0203a6053531eb3d0055bec /sequencer.c
parent5fa8bf6bf9d20ccb37ed46ec7027a9ac64b2a2a7 (diff)
parenta81a7fbc1a423b112158c2d8647ee80caba108ef (diff)
downloadgit-6a8989709efbd6d5187005497907264fde026ae9.zip
git-6a8989709efbd6d5187005497907264fde026ae9.tar.gz
git-6a8989709efbd6d5187005497907264fde026ae9.tar.bz2
Merge branch 'rs/commit-list-append'
There is no need for "commit_list_reverse()" function that only invites inefficient code. By René Scharfe * rs/commit-list-append: commit: remove commit_list_reverse() revision: append to list instead of insert and reverse sequencer: export commit_list_append()
Diffstat (limited to 'sequencer.c')
-rw-r--r--sequencer.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/sequencer.c b/sequencer.c
index cd11e34..81d8ace 100644
--- a/sequencer.c
+++ b/sequencer.c
@@ -468,33 +468,6 @@ static void read_and_refresh_cache(struct replay_opts *opts)
rollback_lock_file(&index_lock);
}
-/*
- * Append a commit to the end of the commit_list.
- *
- * next starts by pointing to the variable that holds the head of an
- * empty commit_list, and is updated to point to the "next" field of
- * the last item on the list as new commits are appended.
- *
- * Usage example:
- *
- * struct commit_list *list;
- * struct commit_list **next = &list;
- *
- * next = commit_list_append(c1, next);
- * next = commit_list_append(c2, next);
- * assert(commit_list_count(list) == 2);
- * return list;
- */
-static struct commit_list **commit_list_append(struct commit *commit,
- struct commit_list **next)
-{
- struct commit_list *new = xmalloc(sizeof(struct commit_list));
- new->item = commit;
- *next = new;
- new->next = NULL;
- return &new->next;
-}
-
static int format_todo(struct strbuf *buf, struct commit_list *todo_list,
struct replay_opts *opts)
{