From: Derrick Stolee Date: Thu, 17 Dec 2020 14:03:49 GMT Subject: Re: [PATCH v5 1/4] commit: move reverse_commit_list() from merge-recursive Message-ID: In-Reply-To: <9052faeabe62d9ba1b9bceae0c0f7b1809bd1b60.1608157683.git.gitgitgadget@gmail.com> On 12/16/2020 5:27 PM, Elijah Newren via GitGitGadget wrote: > +struct commit_list *reverse_commit_list(struct commit_list *list) > +{ > + struct commit_list *next = NULL, *current, *backup; > + for (current = list; current; current = backup) { > + backup = current->next; > + current->next = next; > + next = current; > + } > + return next; > +} > + I followed the discussion about the variable names in the earlier thread, and I certainly did not meant to stir a controversy. I think this approach of deduplicating but keeping an exact copy is the best solution. Thanks, -Stolee