git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Dirk Süsserott" <newsletter@dirk.my1.cc>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: git-rerere: Usage question
Date: Fri, 23 May 2008 17:02:11 -0700	[thread overview]
Message-ID: <7vwslkpo1o.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: 4836D46A.7070807@dirk.my1.cc

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).

  reply	other threads:[~2008-05-24  0:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-23 14:27 git-rerere: Usage question Dirk Süsserott
2008-05-24  0:02 ` Junio C Hamano [this message]
2008-05-24  7:54   ` Mike Hommey
2008-05-24 12:06     ` Dirk Süsserott

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7vwslkpo1o.fsf@gitster.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=newsletter@dirk.my1.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).