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

Re: git-rerere observations and feature suggestions

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 16, 2008, 20:50 UTC
Message-ID
<7vskvd9kai.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<20080616190911.GA7047@elte.hu>
Ingo Molnar <mingo@elte.hu> writes:
Show 16 quoted lines
> * Junio C Hamano <gitster@pobox.com> wrote:
>
>> >  - Automation: would be nice to have a git-rerere modus operandi where
>> >    it would auto-commit things if and only if all conflicting files were 
>> >    resolved.
>> 
>> I am not sure how safe this is.  rerere as originally designed does 
>> not even update the index with merge results so that the application 
>> of earlier resolution can be manually inspected, and this is exactly 
>> because I consider a blind textual reapplication of previous 
>> resolution always iffy, even though I invented the whole mechanism.
> ...
> So i'd not mind if git-rerere was safe by default, but it would be nice 
> to have some knob to turn it into something fast and automatic. For us 
> it would be much _safer_, because right now most of our manual energy is 
> spent on checking something that could be automated.

Oh, "unsafe switch" that is off by default will not hurt anybody, and I do not mind it as a new feature. We are in agreement in that sense.

Perhaps the way forward would be (and this is independent of the issue of recording removal as a possible form of resolution):

 (1) Introduce a new configuration rerere.autoupdate that is off by
     default, but when it is on, paths cleanly resolved by rerere will
     also be updated in the index (if we have capability to record
     removal, this may remove such a path from the index as the result).
 (2) The callers of rerere that expects rerere to resolve needs to be
     changed to see if the resulting index after rerere is fully merged,
     and continue.  Currently the callers are "merge", "rebase" and "am",
     I think.  This step might be a bit more involved than you might
     think, as rerere currently happens in the codepath that knows the
     caller does _not_ go further than leaving the failed conflict to be
     sorted out by the user (rerere is designed as merely a way to help).
     Also you _might_ want a separate configuration rerere.autocommit to
     control this --- the user (but not you) might be willing to allow
     autoupdate but you may still want to eyeball the result.
Independent of the above, we have two potential new features:
 * Introduce "git rerere revert paths..."  that brings the index and
   working tree back to the conflicted state after a previous resolution
   is applied, because that resolution is incorrect.  The old resolution
   cached in rr-cache is also removed.
   This however will become much less useful if you allow autoresolution
   to be committed automatically, as the caller will move ahead without
   giving you a chance to say "oh, that one is bad -- do not proceed".
 * Somehow record the fact that the resolution for a particular conflict
   signature is to remove the resulting path.
Previous: Ingo MolnarNext: Junio C Hamano
Message 16 of 45 in “git-rerere observations and feature suggestions”
  1. Ingo MolnarJun 16, 2008
  2. Mike HommeyJun 16, 2008
  3. Pierre HabouzitJun 16, 2008
  4. Pierre HabouzitJun 16, 2008
  5. Sverre RabbelierJun 16, 2008
  6. Karl HasselströmJun 17, 2008
  7. David KastrupJun 16, 2008
  8. Theodore TsoJun 16, 2008
  9. David KastrupJun 16, 2008
  10. Ingo MolnarJun 16, 2008
  11. Junio C HamanoJun 16, 2008
  12. Ingo MolnarJun 16, 2008
  13. Junio C HamanoJun 16, 2008
  14. Junio C HamanoJun 16, 2008
  15. Ingo MolnarJun 16, 2008
  16. Junio C HamanoJun 16, 2008
  17. 1/5 rerere: rerere_created_at() and has_resolution() abstractionJunio C Hamano, Jun 22, 2008
  18. 2/5 git-rerere: detect unparsable conflictsJunio C Hamano, Jun 22, 2008
  19. 3/5 rerere: remove dubious "tail_optimization"Junio C Hamano, Jun 22, 2008
  20. 4/5 t4200: fix rerere testJunio C Hamano, Jun 22, 2008
  21. 5/5 rerere.autoupdateJunio C Hamano, Jun 22, 2008
  22. Ingo MolnarJun 18, 2008
  23. Miklos VajnaJun 18, 2008
  24. Ingo MolnarJun 18, 2008
  25. Miklos VajnaJun 18, 2008
  26. Ingo MolnarJun 18, 2008
  27. Jakub NarebskiJun 18, 2008
  28. Miklos VajnaJun 18, 2008
  29. Karl HasselströmJun 19, 2008
  30. Miklos VajnaJun 19, 2008
  31. Junio C HamanoJun 19, 2008
  32. Karl HasselströmJun 19, 2008
  33. Miklos VajnaJun 19, 2008
  34. Karl HasselströmJun 19, 2008
  35. Miklos VajnaJun 19, 2008
  36. Karl HasselströmJun 19, 2008
  37. Junio C HamanoJun 16, 2008
  38. Ingo MolnarJun 16, 2008
  39. Ingo MolnarJun 23, 2008
  40. Peter ZijlstraJun 23, 2008
  41. Peter ZijlstraJun 23, 2008
  42. Jeff KingJun 23, 2008
  43. Ingo MolnarJun 23, 2008
  44. Jakub NarebskiJun 16, 2008
  45. Johannes SchindelinJun 17, 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.