git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mike Hommey <mh@glandium.org>
Cc: git@vger.kernel.org
Subject: Re: git-rerere vs rebase --skip
Date: Tue, 28 Aug 2012 15:55:26 -0700	[thread overview]
Message-ID: <7vzk5ey6ch.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <20120828215202.GB7702@glandium.org> (Mike Hommey's message of "Tue, 28 Aug 2012 23:52:02 +0200")

Mike Hommey <mh@glandium.org> writes:

> When rebasing the topic branches, I can hit conflict resolution that I
> already had to do for other topic branches on another upstream import
> branch. Here, git rerere is very helpful. But sometimes, the conflict
> resolution is just to skip the patch, because it was incorporated
> upstream in a way that git doesn't detect, or it was obsoleted, or
> whatever. In such cases, git rerere is not being helpful because it
> doesn't store any information about that, and I have to check again if
> that's an actual conflict to solve or a patch to skip again.
>
> It would be helpful if there was a rebase --skip mode that would tell
> rerere to record that the resolution *is* --skip.

That is like saying "my hammer is very helpful when I want to hit
nails, but sometimes I wish it helped me with screws".

The only thing "rerere" does is to remember the shape of the
conflicted state and desired resolution _per_ _file_.  It does not
tell "rebase" what to do next (you do, via "git add -u" followed by
"git rebase --continue").

Presumably, you _could_ run "git checkout HEAD $path" followed by
"git rerere" to record that a particular shape of the conflicted
state should resolve to what you already have in the HEAD commit, so
that the same conflict that happens in future rebases automatically
resolve to a no-op for these conflicted paths, and telling "rebase"
to continue via the same "add -u && rebase --continue" might notice
that there is no change, and its "skip empty" logic might kick in.

But I wouldn't blindly recommend it.  If a change you are replaying
has two paths, one that somehow cleanly merges, and the other that
conflicts because you do have an equivalent change (and more) in the
updated HEAD, letting "rebase" continue that way would record only
the changes to the first path while ignoring the other one, which
may or may not be what you want.

      reply	other threads:[~2012-08-28 22:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-28 21:52 git-rerere vs rebase --skip Mike Hommey
2012-08-28 22:55 ` Junio C Hamano [this message]

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=7vzk5ey6ch.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=mh@glandium.org \
    /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).