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

Re: [PATCH 2/2] builtin-merge: avoid run_command_v_opt() for recursive

From
Miklos Vajna <vmiklos@frugalware.org>
Date
Aug 11, 2008, 20:45 UTC
Message-ID
<20080811204511.GV18960@genesis.frugalware.org>
In-Reply-To
<7vvdy7wc8j.fsf@gitster.siamese.dyndns.org>
On Mon, Aug 11, 2008 at 01:03:24PM -0700, Junio C Hamano <gitster@pobox.com> wrote:
Show 9 quoted lines
> I was not worried too much about "the other strategy will" case, but isn't
> the general structure of git-merge driver be:
> 
>     - do some set-up computation, and leave info in .git/
>     - call strategy
>     - depending on how it exits, perform further operation (such as
>       writing out tree out of index and updating HEAD) using the info in
>       .git it left before it called strategy, and clean up whatever was
>       done in the first step (things like "drop the index lock"?).

atexit() will take care of this. I'll send a testcase for this in a bit, I just wrote it because I was not exactly sure about this.

Show 5 quoted lines
> Dying in the strategy and not allowing the clean-up was what I was worried
> about.  If you can guarantee that you are not going to leave the
> repository in a wedged state, calling merge-recursive internally is
> perfectly fine, but the codepaths involved need to be carefully vetted for
> that.

As far as I see there are no such codepaths, but I may be wrong; in that case new tests will be needed as well, since the current 'make test' output is happy. ;-)

Previous: Junio C HamanoNext: Miklos Vajna
Message 7 of 38 in “Avoid run_command() for recursive in builtin-merge”
  1. 0/2 Avoid run_command() for recursive in builtin-mergeMiklos Vajna, Aug 10, 2008
  2. 1/2 merge-recursive: prepare merge_recursive() to be called from builtinsMiklos Vajna, Aug 10, 2008
  3. 2/2 builtin-merge: avoid run_command_v_opt() for recursiveMiklos Vajna, Aug 10, 2008
  4. Junio C HamanoAug 11, 2008
  5. Miklos VajnaAug 11, 2008
  6. Junio C HamanoAug 11, 2008
  7. Miklos VajnaAug 11, 2008
  8. Add a new test to ensure merging a submodule is handled properly.Miklos Vajna, Aug 11, 2008
  9. Stephan BeyerAug 11, 2008
  10. Miklos VajnaAug 11, 2008
  11. Junio C HamanoAug 11, 2008
  12. Stephan BeyerAug 11, 2008
  13. builtin-revert.c: Make use of merge_recursive()Stephan Beyer, Aug 11, 2008
  14. Johannes SchindelinAug 11, 2008
  15. Stephan BeyerAug 11, 2008
  16. Miklos VajnaAug 11, 2008
  17. builtin-revert: Make use of merge_recursive()Stephan Beyer, Aug 11, 2008
  18. Stephan BeyerAug 11, 2008
  19. Junio C HamanoAug 11, 2008
  20. Junio C HamanoAug 11, 2008
  21. Stephan BeyerAug 11, 2008
  22. Junio C HamanoAug 11, 2008
  23. Split out merge_recursive() to merge-recursive.cMiklos Vajna, Aug 12, 2008
  24. Stephan BeyerAug 12, 2008
  25. Miklos VajnaAug 12, 2008
  26. merge-recursive.c: Add more generic merge_recursive_generic()Stephan Beyer, Aug 12, 2008
  27. Make builtin-revert.c use merge_recursive_generic()Stephan Beyer, Aug 12, 2008
  28. Miklos VajnaAug 12, 2008
  29. Stephan BeyerAug 13, 2008
  30. Miklos VajnaAug 13, 2008
  31. Daniel BarkalowAug 13, 2008
  32. Stephan BeyerAug 13, 2008
  33. Daniel BarkalowAug 13, 2008
  34. Junio C HamanoAug 13, 2008
  35. Stephan BeyerAug 13, 2008
  36. Daniel BarkalowAug 13, 2008
  37. Junio C HamanoAug 13, 2008
  38. Junio C HamanoAug 14, 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.