* git-rerere: Usage question @ 2008-05-23 14:27 Dirk Süsserott 2008-05-24 0:02 ` Junio C Hamano 0 siblings, 1 reply; 4+ messages in thread From: Dirk Süsserott @ 2008-05-23 14:27 UTC (permalink / raw) To: Git Mailing List I recently read the docs for 'git-rerere'. Seems a cool feature. But I'm not quite sure whether I understood it right. I think I understood what it does but I didn't understand when to call it. Is it true that it's not neccessary to issue that command manually when I configured "rerere.enabled true"? The docs say that I *can* call it but it also says that git-merge and git-rebase call it automatically whenever needed. Thus it seems to be one of the plumbing tools to me, which I only call in case of emergency. Am I right? Dirk ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git-rerere: Usage question 2008-05-23 14:27 git-rerere: Usage question Dirk Süsserott @ 2008-05-24 0:02 ` Junio C Hamano 2008-05-24 7:54 ` Mike Hommey 0 siblings, 1 reply; 4+ messages in thread From: Junio C Hamano @ 2008-05-24 0:02 UTC (permalink / raw) To: Dirk Süsserott; +Cc: Git Mailing List Dirk Süsserott <newsletter@dirk.my1.cc> writes: > I recently read the docs for 'git-rerere'. Seems a cool feature. > But I'm not quite sure whether I understood it right. I think > I understood what it does but I didn't understand when to call > it. > > Is it true that it's not neccessary to issue that command manually > when I configured "rerere.enabled true"? The docs say that I *can* > call it but it also says that git-merge and git-rebase call it > automatically whenever needed. > > Thus it seems to be one of the plumbing tools to me, which > I only call in case of emergency. Am I right? It started as an independent, opt-in feature, that people _could_ use manually. In that mode: (1) when you see "git merge" stop at a conflict, you say "git rerere", expecting one of two benefits: (1-a) If the conflict is something you have used rerere on previously, this may apply the previous resolution. (1-b) Otherwise, the conflict is recorded, so that you can record the corresponding resolution after manually resolving it. (2) after having to manually resolve the conflict, if you did "git rerere" in step (1), you can say "git rerere" again to record it. These days, rerere is pretty much automatic in that rerere is called automatically from places that generate conflicts (e.g. "git merge") for purpose of (1), and from places that the user tells git that the conflicts are now resolved (e.g. "git commit") for purpose of (2). So it is not even for "emergency" anymore. The only time you still might want to call it yourself is when you are not comfortable with the conflict resolution you just did (iow, if it later turns out to be a bad resolution, you may regret recording that incorrect resolution). In such a case, you would say "git rerere clear" before committing the result (in which time, "rerere" automatically try to record but because of earlier "rerere clear" it does not find anything to record). ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git-rerere: Usage question 2008-05-24 0:02 ` Junio C Hamano @ 2008-05-24 7:54 ` Mike Hommey 2008-05-24 12:06 ` Dirk Süsserott 0 siblings, 1 reply; 4+ messages in thread From: Mike Hommey @ 2008-05-24 7:54 UTC (permalink / raw) To: Junio C Hamano; +Cc: Dirk Süsserott, Git Mailing List On Fri, May 23, 2008 at 05:02:11PM -0700, Junio C Hamano wrote: > These days, rerere is pretty much automatic in that rerere is called > automatically from places that generate conflicts (e.g. "git merge") for > purpose of (1), and from places that the user tells git that the conflicts > are now resolved (e.g. "git commit") for purpose of (2). Note that it is not totally automatic for most people because the default is to enable only if the .git/rr_cache directory exists, and neither git init nor git clone create this directory. You still have to set rerere.enabled yourself. Mike ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: git-rerere: Usage question 2008-05-24 7:54 ` Mike Hommey @ 2008-05-24 12:06 ` Dirk Süsserott 0 siblings, 0 replies; 4+ messages in thread From: Dirk Süsserott @ 2008-05-24 12:06 UTC (permalink / raw) To: Mike Hommey; +Cc: Junio C Hamano, Dirk Süsserott, Git Mailing List Mike Hommey schrieb: > On Fri, May 23, 2008 at 05:02:11PM -0700, Junio C Hamano wrote: > >> These days, rerere is pretty much automatic in that rerere is called >> automatically from places that generate conflicts (e.g. "git merge") for >> purpose of (1), and from places that the user tells git that the conflicts >> are now resolved (e.g. "git commit") for purpose of (2). >> > > Note that it is not totally automatic for most people because the > default is to enable only if the .git/rr_cache directory exists, and > neither git init nor git clone create this directory. > git-gc does -- at least if rerere.enabled is set. Thanks for the pointer that this directory must exist. Probably it gets auto-created when needed? I didn't check that out coz I currently have nothing to merge with :-( A simple no-op "git pull" (Already up-to-date) did *not* create the directory, but git-gc did. Dirk ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-05-24 12:07 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-05-23 14:27 git-rerere: Usage question Dirk Süsserott 2008-05-24 0:02 ` Junio C Hamano 2008-05-24 7:54 ` Mike Hommey 2008-05-24 12:06 ` Dirk Süsserott
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).