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

Re: [PATCH 4/4] merge-recursive: rename merge_file_1() and merge_content()

From
Stefan Beller <sbeller@google.com>
Date
Sep 19, 2018, 23:40 UTC
Message-ID
<CAGZ79kayKOmFhNxZyZ7-eumnLdK5-GtOb4OXFwdDP3qe4uQY7Q@mail.gmail.com>
In-Reply-To
<20180919161434.3272-5-newren@gmail.com>
On Wed, Sep 19, 2018 at 9:15 AM Elijah Newren <newren@gmail.com> wrote:
Show 18 quoted lines
>
> Summary:
>   merge_file_1()  -> merge_mode_and_contents()
>   merge_content() -> handle_content_merge()
>
> merge_file_1() is a very unhelpful name.  Rename it to
> merge_mode_and_contents() to reflect what it does.
>
> merge_content() calls merge_mode_and_contents() to do the main part of
> its work, but most of this function was about higher level stuff, e.g.
> printing out conflict messages, updating skip_worktree bits, checking
> for ability to avoid updating the working tree or for D/F conflicts
> being in the way, etc.  Since there are several handle_*() functions for
> similar levels of checking and handling in merge-recursive.c (e.g.
> handle_change_delete(), handle_rename_rename_2to1()), let's rename this
> function to handle_content_merge().
>
> Signed-off-by: Elijah Newren <newren@gmail.com>

I looked through the whole series and 1,2,4 are obvious improvements IMHO, and 3 in itself is not worth it if it weren't for 4 (as now we don't have neither _1 and _one functions in this file).

The whole series looks good to me.

Thanks, Stefan

Previous: Elijah NewrenNext: Elijah Newren
Message 3 of 6 in “Cleanup of merge_*() functions in merge-recursive”
  1. 0/4 Cleanup of merge_*() functions in merge-recursiveElijah Newren, Sep 19, 2018
  2. 4/4 merge-recursive: rename merge_file_1() and merge_content()Elijah Newren, Sep 19, 2018
  3. Stefan BellerSep 19, 2018
  4. 3/4 merge-recursive: remove final remaining caller of merge_file_one()Elijah Newren, Sep 19, 2018
  5. 2/4 merge-recursive: avoid wrapper function when unnecessary and wastefulElijah Newren, Sep 19, 2018
  6. 1/4 merge-recursive: set paths correctly when three-way merging contentElijah Newren, Sep 19, 2018

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.