From: Jeff King <peff@peff.net>
To: Alireza <rezaxm@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Request for adding a "one-shot" rebase strategy where conflicts are only resolved once
Date: Thu, 3 Oct 2024 17:30:29 -0400 [thread overview]
Message-ID: <20241003213029.GB12763@coredump.intra.peff.net> (raw)
In-Reply-To: <CAD9n_qgBPDQKF=ZEQ6SWvDCmcUXZvz33zSoHFQSwHmQPWS4z_Q@mail.gmail.com>
On Thu, Oct 03, 2024 at 10:36:28PM +0330, Alireza wrote:
> Sometimes a clean merge is possible but with a rebase, in-between
> commits may raise conflicts in which case a conflict must be resolved
> for each commit individually, which is not quite productive and at the
> end wouldn't add so much in how the resulting history looks like.
>
> With a "one-shot" rebase, a conflict (if any) is made based on the
> latest revision, then in-between commits approximated based on that
> resolution. This way the history can be roughly preserved with the
> same amount of effort while still using a rebase rather than merge.
I'm not quite sure how you'd approximate those fixes in the general
case. You could leave the conflict markers in place, making it obvious
that the intermediate state is broken, and then replace it all at the
end.
That does make me question what the value is in rebasing instead of
simply merging, though.
You might want to peek at git-imerge (which also does rebasing, despite
the name):
https://github.com/mhagger/git-imerge
I think in a sense it is the _opposite_ of what you are asking for, in
that it breaks the merge down into its smallest parts by finding the
conflicting pairs. But I wonder if you'd find the conflicts it produces
more pleasant to work with, or more tedious.
-Peff
next prev parent reply other threads:[~2024-10-03 21:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-03 19:06 Request for adding a "one-shot" rebase strategy where conflicts are only resolved once Alireza
2024-10-03 20:15 ` Kristoffer Haugsbakk
2024-10-03 21:10 ` Alireza
2024-10-03 21:30 ` Jeff King [this message]
2024-10-03 21:30 ` brian m. carlson
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=20241003213029.GB12763@coredump.intra.peff.net \
--to=peff@peff.net \
--cc=git@vger.kernel.org \
--cc=rezaxm@gmail.com \
/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