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

Re: [PATCH 5/6] rerere: let caller decide whether to renormalize

From
Junio C Hamano <gitster@pobox.com>
Date
Aug 4, 2010, 18:12 UTC
Message-ID
<7vocdifdrk.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100804032338.GF19699@burratino>
Jonathan Nieder <jrnieder@gmail.com> writes:
> NEEDSWORK: this is a step in the wrong direction.  rerere needs
> an -s option to use an arbitrary merge strategy and a -X option to
> pass arbitrary options to that driver.
If you are talking about "rerere", I strongly disagree with that.
1. "-s"
   A "merge strategy" deals with the shape of the history (e.g. common
   ancestor selection or synthesis for the purpose of 3-way merge) and the
   shape of the trees (e.g. rename detection, subtree shifting).  Starting
   from two commits, it decides, based on the shape of the history, what
   three trees your tree-level 3-way merge would operate on, and then
   based on the shape of the trees, decides the pairing of blobs to run
   the 3-way merge at the file-content level.
   When "rerere" is invoked, a strategy already has dealt with all of the
   above, and "rerere" only works on the (half-completed) result of that.
   It is purely a three-way merge at the file-contents level and there is
   no room for a "strategy" to get involved.  It makes direct calls to
   ll_merge() exactly for this reason.
2. "-X"
   In the "merge -X<opt>" syntax, "-X" does not stand for "low level
   details"; it just means "eXternal callout".  It is there just to tell
   the "merge" front-end "You may not understand this yourself, but the
   program you call does, so just pass it along".
   IOW, we want to be able to pass --<opt> through the frontend to the
   backend, without having to tell all the options any possible backends
   may know to the frontend.  Just to make it easier to parse and tell
   which ones are the front-end options and which ones are not (for both
   machines and humans), we say -X<opt> to the frontend.  Then "merge"
   turns that -X<opt> into "--<opt>" and give it to the strategy.
   A command that natively knows about an option is correct to take an
   option as "--<option>", e.g. "merge--recursive --renormalize".  You
   trigger it by saying "merge -Xrenormalize" from the frontend.

To recap: it is absolutely the right thing to do to introduce a new "rerere --renormalize" option, like your patch did. Doing anything else IS a step in the wrong direction.

Previous: Jonathan NiederNext: Jonathan Nieder
Message 13 of 35 in “Merge renormalization, config renamed”
  1. 0/3 Merge renormalization, config renamedEyvind Bernhardsen, Jul 2, 2010
  2. 1/3 Avoid conflicts when merging branches with mixed normalizationEyvind Bernhardsen, Jul 2, 2010
  3. 2/3 Try normalizing files to avoid delete/modify conflicts when mergingEyvind Bernhardsen, Jul 2, 2010
  4. 3/3 Don't expand CRLFs when normalizing text during mergeEyvind Bernhardsen, Jul 2, 2010
  5. Junio C HamanoJul 2, 2010
  6. 0/6 merge -XrenormalizeJonathan Nieder, Aug 4, 2010
  7. 1/6 merge-trees: push choice to renormalize away from low levelJonathan Nieder, Aug 4, 2010
  8. 2/6 merge-trees: let caller decide whether to renormalizeJonathan Nieder, Aug 4, 2010
  9. 3/6 ll-merge: let caller decide whether to renormalizeJonathan Nieder, Aug 4, 2010
  10. Junio C HamanoAug 4, 2010
  11. 4/6 rerere: migrate to parse-options APIJonathan Nieder, Aug 4, 2010
  12. 5/6 rerere: let caller decide whether to renormalizeJonathan Nieder, Aug 4, 2010
  13. Junio C HamanoAug 4, 2010
  14. 0/12 Re: rerere: let caller decide whether to renormalizeJonathan Nieder, Aug 5, 2010
  15. 01/12 t6038 (merge.renormalize): style nitpicksJonathan Nieder, Aug 5, 2010
  16. Ævar Arnfjörð BjarmasonAug 5, 2010
  17. Jonathan NiederAug 5, 2010
  18. 02/12 t6038 (merge.renormalize): try checkout -m and cherry-pickJonathan Nieder, Aug 5, 2010
  19. 03/12 t6038 (merge.renormalize): check that it can be turned offJonathan Nieder, Aug 5, 2010
  20. 04/12 merge-trees: push choice to renormalize away from low levelJonathan Nieder, Aug 5, 2010
  21. 05/12 merge-trees: let caller decide whether to renormalizeJonathan Nieder, Aug 5, 2010
  22. 06/12 Documentation/technical: document ll_mergeJonathan Nieder, Aug 5, 2010
  23. 07/12 ll-merge: make flag easier to populateJonathan Nieder, Aug 5, 2010
  24. Bert WesargAug 5, 2010
  25. Jonathan NiederAug 5, 2010
  26. Bert WesargAug 5, 2010
  27. Jonathan NiederAug 5, 2010
  28. 08/12 ll-merge: let caller decide whether to renormalizeJonathan Nieder, Aug 5, 2010
  29. 09/12 t4200 (rerere): modernize styleJonathan Nieder, Aug 5, 2010
  30. 10/12 rerere: migrate to parse-options APIJonathan Nieder, Aug 5, 2010
  31. 11/12 rerere: never renormalizeJonathan Nieder, Aug 5, 2010
  32. 12/12 merge-recursive --renormalizeJonathan Nieder, Aug 5, 2010
  33. Eyvind BernhardsenAug 5, 2010
  34. 6/6 merge-recursive: add -Xrenormalize optionJonathan Nieder, Aug 4, 2010
  35. Junio C HamanoAug 4, 2010

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.