git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-rerere vs rebase --skip
@ 2012-08-28 21:52 Mike Hommey
  2012-08-28 22:55 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Mike Hommey @ 2012-08-28 21:52 UTC (permalink / raw)
  To: git

Hi,

In one of my workflows, I constantly rebase topic branches on top of new
upstream imports. As there are several upstream import branches, I have
similar topic branches on top of different imports.
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.

Mike

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: git-rerere vs rebase --skip
  2012-08-28 21:52 git-rerere vs rebase --skip Mike Hommey
@ 2012-08-28 22:55 ` Junio C Hamano
  0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2012-08-28 22:55 UTC (permalink / raw)
  To: Mike Hommey; +Cc: git

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-28 22:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-28 21:52 git-rerere vs rebase --skip Mike Hommey
2012-08-28 22:55 ` Junio C Hamano

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