On Sat, Jul 15, 2017 at 1:00 PM, Peter Humphrey <pe...@prh.myzen.co.uk> wrote:
> Hello list,
>
> Today I get this:
>
> # emerge --sync
>>>> Syncing repository 'gentoo' into '/usr/portage'...
> /usr/bin/git pull
> remote: Counting objects: 25, done.
> remote: Compressing objects: 100% (9/9), done.
> remote: Total 25 (delta 15), reused 25 (delta 15), pack-reused 0
> Unpacking objects: 100% (25/25), done.
> From https://github.com/gentoo-mirror/gentoo
>    c80ef88a736..b9cb9e0b42e  stable     -> origin/stable
> Updating c5ec29f674c..b9cb9e0b42e
> error: Your local changes to the following files would be overwritten by
> merge:
>         metadata/layout.conf
> Please commit your changes or stash them before you merge.
> Aborting
> !!! git pull error in /usr/portage
>
> I can't imagine I'd ever make any changes to that file, especially not using
> git, but I tried reverting to backups of /var and /usr/portage from a week
> ago, but I still get the same error. Using backups from two weeks ago also
> made no difference.
>
> I sync and update every day, with never a problem like this before.
>
> Can anyone see what else I should try? Should I just delete the offending
> file? (I'll get some coffee meanwhile...)
>
> --
> Regards
> Peter
>
>
git-checkout(1) has a '--theirs' option that might do the trick there:

The index may contain unmerged entries because of a previous failed
merge. By default, if you try to check out such an entry from the
index, the checkout operation will fail and nothing will be checked
out.
...
You could try:
git checkout --theirs metadata/layout.conf

Reply via email to