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

Re: [PATCH] Build in merge

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 8, 2008, 01:05 UTC
Message-ID
<7vskulxk0o.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080708010007.GA10347@genesis.frugalware.org>
Miklos Vajna <vmiklos@frugalware.org> writes:
Show 6 quoted lines
> I could imagine the following situations:
>
> 1) A project has code in a repo, some documentation and po files.
>
> The first two can be merged with builtin strategies, the later probably
> needs a custom merge driver.

Per-path merge is probably better handled with custom ll-merge driver anyway. See gitattributes(5).

> 2) Someone is not happy with the current recursive strategy and writes
> from scratch a new one. He/she puts it to pull.twohead, so it will be
> tried before recursive.
That is fine.
> To sum up: I am not sure what would be the benefit of being able to
> specify flags for strategies. However, if we want so, it would be good
> to discuss how it should be done.
It wasn't *me* ;-) who wanted to add these "flags".

I think it does not matter what "my-strategy" does unless "-s my-strategy" (or pull.twohead) is explicitly given by the user, and at that time, DEFAULT_* options should not matter. It probably is Ok to allow fast forward and trivial merges to them. We'll see.

Show 11 quoted lines
>> The part that records which strategies were specified from the command
>> line *in what order* via "-s foo" switches should remain list of pointers
>> into "struct strategy", which is called "struct strategy **use_strategies"
>> in the code and corresponds to the $use_strategies variable in the
>> scripted version.  The order of these is important, as that defines in
>> which order the strategies are tried [*1*].  If you go route (1), these
>> pointers will all be pointing at elements in all_strategies[]; with route
>> (2) they may be pointing at either all_strageties[] element or
>> user_strategies[] element.
>
> I see the problem, I lost the order at the moment.
That's Ok.  See the other patch on top of your previous one.
Previous: Miklos VajnaNext: Miklos Vajna
Message 19 of 26 in “Build in merge”
  1. 00/14 Build in mergeMiklos Vajna, Jul 1, 2008
  2. 08/14 Add new test to ensure git-merge handles more than 25 refs.Miklos Vajna, Jul 1, 2008
  3. 13/14 git-commit-tree: make it usable from other builtinsMiklos Vajna, Jul 1, 2008
  4. 14/14 Build in mergeMiklos Vajna, Jul 1, 2008
  5. Junio C HamanoJul 1, 2008
  6. Miklos VajnaJul 1, 2008
  7. 14/14 Build in mergeMiklos Vajna, Jul 1, 2008
  8. Junio C HamanoJul 1, 2008
  9. Miklos VajnaJul 2, 2008
  10. Junio C HamanoJul 6, 2008
  11. Junio C HamanoJul 6, 2008
  12. Miklos VajnaJul 7, 2008
  13. Junio C HamanoJul 7, 2008
  14. Build in mergeMiklos Vajna, Jul 7, 2008
  15. Junio C HamanoJul 8, 2008
  16. Junio C HamanoJul 8, 2008
  17. Build in mergeMiklos Vajna, Jul 8, 2008
  18. Miklos VajnaJul 8, 2008
  19. Junio C HamanoJul 8, 2008
  20. Miklos VajnaJul 8, 2008
  21. Johannes SchindelinJul 6, 2008
  22. Junio C HamanoJul 6, 2008
  23. Build in mergeMiklos Vajna, Jul 7, 2008
  24. Miklos VajnaJul 7, 2008
  25. Junio C HamanoJul 1, 2008
  26. Miklos VajnaJul 1, 2008

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.