git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Aleksander Korzyński" <ak@akorzy.net>
To: ak@akorzy.net
Cc: Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	git@vger.kernel.org
Subject: Re: Beyond Merge and Rebase: The Upstream Import Approach in Git
Date: Tue, 1 Aug 2023 11:17:06 +0200	[thread overview]
Message-ID: <CADWu+UmjFiKa2h4qqumA-jOfEGvVnsV85bOTKgYhpQwYCf=VFw@mail.gmail.com> (raw)
In-Reply-To: <CADWu+UnvastFbWsjfHvJhvS1RBgD8M1LXuA2VMBMSkTqpiLS5w@mail.gmail.com>

Hi,

Thanks again for your responses, Junio and Johannes. I'm looking to
implement the discussed structure in git. As the first step, I'd like
to implement:

git merge -s theirs

The name of the `theirs` strategy above is inspired by the existing
`ours` strategy. The command above is going to be the equivalent of
the following three commands:

git merge --no-commit -s ours <commit>
git read-tree --reset -u <commit>
git commit --no-edit

The new command is going to be used to create the last "welding merge"
at the end of the structure below:

     o---o---o---o---o  upstream/main
          \           \
           \           a'---b'---c'
            \                     \
             a---b---c-------------M main

The strategy above could be called "rebase & weld". The new command
can also be used with the "weld & rebase" strategy described by
Johannes:

   o---o---o---o---o  upstream/main
        \           \
         a---b---c---M---a'---b'---c' main

In addition, `git merge -s theirs` could be called `git weld`, which
would make it shorter to type. What do you think?

Also, I'm thinking about the eventual interface for creating the
entire structure. Perhaps "rebase & weld" could be created with the
following command:

git rebase --weld

and "weld & rebase" with the following:

git rebase --pre-weld

What are your thoughts?

--
Best regards,
Aleksander Korzynski

  reply	other threads:[~2023-08-01  9:19 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-11  8:24 Beyond Merge and Rebase: The Upstream Import Approach in Git Aleksander Korzyński
2023-07-11 17:02 ` Junio C Hamano
2023-07-13 10:55   ` Aleksander Korzyński
2023-07-12 11:34 ` Johannes Schindelin
2023-07-12 15:37   ` Junio C Hamano
2023-07-12 20:27     ` Junio C Hamano
2023-07-14 10:56       ` Aleksander Korzyński
2023-08-01  9:17         ` Aleksander Korzyński [this message]
2023-07-14 10:06   ` Aleksander Korzyński

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='CADWu+UmjFiKa2h4qqumA-jOfEGvVnsV85bOTKgYhpQwYCf=VFw@mail.gmail.com' \
    --to=ak@akorzy.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.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;
as well as URLs for NNTP newsgroup(s).