]> git.ipfire.org Git - thirdparty/git.git/commit - builtin/commit.c
commit: simplify building parents list
authorRené Scharfe <l.s.r@web.de>
Sat, 29 Oct 2016 12:55:36 +0000 (14:55 +0200)
committerJunio C Hamano <gitster@pobox.com>
Sun, 30 Oct 2016 23:03:25 +0000 (16:03 -0700)
commitde9f7fa3b08ae0554e57f6a6f5de2559d5bcb871
tree4ba7581e8c3ccdcb67b292bb4ab3dfb939fa088e
parent0b65a8dbdb38962e700ee16776a3042beb489060
commit: simplify building parents list

Push pptr down into the FROM_MERGE branch of the if/else statement,
where it's actually used, and call commit_list_append() for appending
elements instead of playing tricks with commit_list_insert().  Call
copy_commit_list() in the amend branch instead of open-coding it.  Don't
bother setting pptr in the final branch as it's not used thereafter.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/commit.c