Hi!

On Mon, 2025-08-18 at 09:47:03 +0100, Simon McVittie wrote:
> On Mon, 18 Aug 2025 at 08:57:03 +0200, Marc Haber wrote:
> > Additionally, is there a way to accept parts of an MR in Gitlab?
> 
> Not through the web UI, but you can `git cherry-pick` as usual, and
> then (ask the contributor to) rebase the rest. If you have a
> configuration in .git/config like this:
> 
> [remote "origin"]
>       url = https://salsa.debian.org/utopia-team/dbus.git
>       fetch = +refs/heads/*:refs/remotes/origin/*
> [remote "merge-requests"]
>       url = https://salsa.debian.org/utopia-team/dbus.git
>       fetch = +refs/merge-requests/*/head:refs/remotes/merge-requests/*
>       tagopt = --no-tags
> 
> then the usual `git remote update` will fetch every MR for your
> inspection.

People might want to have these configured as different remotes if they
want to select when to update from each (like the above), but this can
also be configured as part of the same remote if one always wants all
of them fetched. For example I've used it like that for libbsd:

  ,---
  [remote "fdo"]
        url = g...@gitlab.freedesktop.org:libbsd/libbsd.git
        fetch = +refs/heads/*:refs/remotes/fdo/*
        fetch = +refs/merge-requests/*/head:refs/remotes/fdo/mr/*
  `---

Regards,
Guillem

Reply via email to