git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [GSoC][PATCH] commit: warn the usage of reverse_commit_list() helper

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 7, 2023, 18:53 UTC
Message-ID
<xmqqk00tz4rt.fsf@gitster.g>
In-Reply-To
<20230207150359.177641-1-five231003@gmail.com>
Kousik Sanagavarapu <five231003@gmail.com> writes:
Show 7 quoted lines
> -/* Modify list in-place to reverse it, returning new head; list will be tail */
> +/*
> + * Modify list in-place to reverse it, returning new head; list will be tail.
> + *
> + * NOTE! The reversed list is constructed using the elements of the original
> + * list, hence losing the original list.
> + */

After re-reading the original, I realize that "in-place" is good enough clue to say that this is destructive.

Previous: Kousik SanagavarapuNext: Kousik Sanagavarapu
Message 4 of 5 in “commit: warn the usage of reverse_commit_list() helper”
  1. Kousik SanagavarapuFeb 7, 2023
  2. Ævar Arnfjörð BjarmasonFeb 7, 2023
  3. Kousik SanagavarapuFeb 8, 2023
  4. Junio C HamanoFeb 7, 2023
  5. Kousik SanagavarapuFeb 8, 2023

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.