{"thread":{"id":"17662","subject":"Re: understanding merge history","startedAt":"2009-02-08T22:16:06Z","lastAt":"2009-02-08T22:16:06Z","messageCount":1,"participants":["Sam Vilain"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"103788","messageId":"498F59A6.4000402@vilain.net","threadId":"17662","inReplyTo":"20090204212808.GS3558@iabyn.com","subject":"Re: understanding merge history","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2009-02-08T22:16:06Z","receivedAt":"2009-02-08T22:16:06Z","isPatch":false,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Dave Mitchell wrote:\n> Perhaps I was misunderstanding rerere. I assumed it would only replay\n> identical resolves on the same branch, rather than being able to cope with\n> slightly different resolves on a different branch.\n>\n> However, after playing with it just now I can't seem to get it to work in\n> the initial phase of recording a resolve that has previously taken place.\n>\n> Given three commits A,B M, where M is a previous merge of A,B:\n>\n>     A-M\n>      /  \n>     B\n>\n> I tried the following:\n>\n> git checkout A\n> git merge B\t\t# replay the initial conflict\n> git rerere clear\n> git rerere\t\t# record the initial conflict state\n>\n> git reset --hard M\t# simulate the post-resolve state\n> git rerere\t\t# and record it\n>\n>\n> But then\n>\n>     git rerere diff\n> and\n>     git rerere status\n>\n> both show nothing, so I'm assuming it didn't manage to capture anything.\n>   \n\n[cross-posted to the git list so that people will answer who use this\ncommand a bit more than myself and to help provide the use case for\nmaking the interface better]\n\nI think the problem is that you want to run something like 'git checkout\nM \\*' or 'git read-tree M' instead of 'git reset --hard M'. ie, change\nthe index only and not the HEAD reference. Once this is done then 'git\ncommit' (this will be a dummy commit you'll throw away) or perhaps just\n'git rerere' should be enough to update the rerere cache.\n\nBut perhaps someone else will have tried this before and knows how to do\nit..\n\nSam.\n"}]}