It often happens, that layman fails to pull some overlays. Solving this is done by
$ git reset --hard origin/master
manually.
Please integrate this in layman.
Maybe this is related to my configuration
git_addopts : --depth=1
git_syncopts : --depth=1
related to bug 500358.
I already talked to mv about his overlay, maybe this is caused by some rebase on the repos. But it also happens for other overlays:
* Running Git... # ( cd /var/lib/layman/mv && /usr/bin/git pull --depth=1 )
error: Pull is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
* Failure result returned from Git
*
* Errors:
* ------
* Failed to sync overlay "mv".
* Error was: Syncing overlay "mv" returned status 128!
* db.sync()
*
* Running Git... # ( cd /var/lib/layman/flavour && /usr/bin/git pull --depth=1 )
error: Pull is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
* Failure result returned from Git
*
* Errors:
* ------
* Failed to sync overlay "flavour".
* Error was: Syncing overlay "flavour" returned status 128!
* db.sync()
*
Reproducible: Sometimes

Having layman handle something like this would be far too automatic and should be left in the hands of the user. As such, I recommend that if a user runs into issues like this then they should either move the changed file from the overlay, reset the changes, or commit the changes and add --rebase to git opts to preserve them on pull.

My opinion is different about this because
* I have to to these resets for many overlays nearly every time I do a --sync.
* users most probably are not responsible for changes in the overlay and did not even touch the files there
* users just want to have a up-to-date bare repository without history just like rsync would do. Using git for these tasks today is just abusing their good implementation of delta-updates for the costs of some additional meta /.git data. git even better performs than rsync. This has been discussed in the past when portage switched to sync-type git by default. This is not the purpose of git and asking #git people for bare repo updates they will tell you that git is not designed like this. But it works, performs well and I agree with the decision.
Anyway. For not failing with nearly every sync I will need to add some "git reset --hard origin/master" to the scripts.

You can do this on your own right now...
In layman.cfg theere is this line:
#git_command : /usr/bin/git
uncomment it and set it to your own wrapper script the gleans the repo path from the options it is passed, does your git reset and then continues with the normal pull.

Sorry, this issue was caused by
git_addopts : --depth=1
git_syncopts : --depth=1
proposed in the currently unconfirmed bug 500358.
Please mark this bug as duplicate of that, if you agree, as it needs to be discussed there, how layman should fetch/pull shallow git repos as portage already does (bug 552814).