public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Zac Medico <zmedico@gentoo.org>
To: gentoo-portage-dev@lists.gentoo.org, Matt Turner <mattst88@gentoo.org>
Cc: Zac Medico <zmedico@gentoo.org>
Subject: Re: [gentoo-portage-dev] [PATCH gentoolkit] bin: Add merge-driver-ekeyword
Date: Thu, 31 Dec 2020 12:05:50 -0800	[thread overview]
Message-ID: <7af7ae3d-cb05-1c1f-4d70-735cf089fed4@gentoo.org> (raw)
In-Reply-To: <20201231194723.177630-1-mattst88@gentoo.org>


[-- Attachment #1.1: Type: text/plain, Size: 1375 bytes --]

On 12/31/20 11:47 AM, Matt Turner wrote:
> Since the KEYWORDS=... assignment is a single line, git struggles to
> handle conflicts. When rebasing a series of commits that modify the
> KEYWORDS=... it's usually easier to throw them away and reapply on the
> new tree than it is to manually handle conflicts during the rebase.
> 
> git allows a 'merge driver' program to handle conflicts; this program
> handles conflicts in the KEYWORDS=... assignment. E.g., given an ebuild
> with these keywords:
> 
> KEYWORDS="~alpha amd64 arm arm64 ~hppa ppc ppc64 x86"
> 
> One developer drops the ~alpha keyword and pushes to gentoo.git, and
> another developer stabilizes hppa. Without this merge driver, git
> requires the second developer to manually resolve the conflict which is
> tedious and prone to mistakes when rebasing a long series of patches.
> With the custom merge driver, it automatically resolves the conflict.
> 
> To use the merge driver, configure your gentoo.git as such:
> 
> gentoo.git/.git/config:
> 
> 	[merge "keywords"]
> 		name = KEYWORDS merge driver
> 		driver = merge-driver-ekeyword %O %A %B %P
> 
> gentoo.git/.git/info/attributes:
> 
> 	*.ebuild merge=keywords
> 
> Signed-off-by: Matt Turner <mattst88@gentoo.org>
> ---
> v3: Address Zac's feedback: use tempfile.TemporaryDirectory

Looks great!
-- 
Thanks,
Zac


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 981 bytes --]

  reply	other threads:[~2020-12-31 20:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-28 23:15 [gentoo-portage-dev] [PATCH gentoolkit] bin: Add merge-driver-ekeyword Matt Turner
2020-12-29  1:09 ` Zac Medico
2020-12-29  5:54   ` Zac Medico
2020-12-31 19:47   ` Matt Turner
2020-12-31 20:05     ` Zac Medico [this message]
2020-12-31 19:48   ` Matt Turner

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=7af7ae3d-cb05-1c1f-4d70-735cf089fed4@gentoo.org \
    --to=zmedico@gentoo.org \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    --cc=mattst88@gentoo.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