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

Re: [PATCH] merge-tree: load default git config

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
May 10, 2023, 23:27 UTC
Message-ID
<645c28576290d_7b63e2942d@chronos.notmuch>
In-Reply-To
<xmqq5y8z3jif.fsf@gitster.g>
Junio C Hamano wrote:
Show 13 quoted lines
> "Derrick Stolee via GitGitGadget" <gitgitgadget@gmail.com> writes:
> 
> > The fix is simple: load the default Git config in cmd_merge_tree().
> > This may also fix other behaviors that are effected by reading default
> > config. The only possible downside is a little extra computation time
> > spent reading config. The config parsing is placed after basic argument
> > parsing so it does not slow down usage errors.
> 
> Presumably merge-tree wants to serve a low-level machinery that
> gives reliable reproducible result, we may want to keep the
> configuration variables we read as narrow as practical.  The
> default_config() callback may still be wider than desirable from
> that point of view, but I guess that is the most reasonable choice?

If you want to *intentionally* ignore merge.conflictStyle in `git merge-tree` then the documentation has to be updated as this is clearly not true:

  The performed merge will use the same feature as the "real"
  linkgit:git-merge[1], including:
    * three way content merges of individual files
    * rename detection
    * proper directory/file conflict handling
    * recursive ancestor consolidation (i.e. when there is more than one
      merge base, creating a virtual merge base by merging the merge bases)
    * etc.

If you want to ignore merge.conflictStyle, then `git merge-tree` would *not* be using the same features as the real `git merge`, in particular proper conflict halding (the conflict markers will be different).

-- 
Felipe Contreras
Previous: Junio C HamanoNext: Felipe Contreras
Message 11 of 16 in “merge-tree: load default git config”
  1. merge-tree: load default git configDerrick Stolee via GitGitGadget, May 10, 2023
  2. Junio C HamanoMay 10, 2023
  3. Derrick StoleeMay 10, 2023
  4. Taylor BlauMay 10, 2023
  5. Elijah NewrenMay 11, 2023
  6. Felipe ContrerasMay 10, 2023
  7. Derrick StoleeMay 11, 2023
  8. Felipe ContrerasMay 11, 2023
  9. Felipe ContrerasMay 11, 2023
  10. Junio C HamanoMay 10, 2023
  11. Felipe ContrerasMay 10, 2023
  12. Felipe ContrerasMay 11, 2023
  13. Elijah NewrenMay 11, 2023
  14. Felipe ContrerasMay 11, 2023
  15. Derrick StoleeMay 11, 2023
  16. merge-tree: load config correctlyFelipe Contreras, May 11, 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.