# [BUG] unable to checkout branch with a clean worktree

3 messages from 2009-01-05 to 2009-01-05. Participants: Anders Melchiorsen, Clemens Buchacher.
Thread: https://gitlist.dev/t/16995

## Anders Melchiorsen, 2009-01-05 15:42

Subject: [BUG] unable to checkout branch with a clean worktree
Message-ID: <35079.bFoQE3daRhY=.1231170168.squirrel@webmail.hotelhot.dk>
URL: https://gitlist.dev/e/35079.bFoQE3daRhY%3D.1231170168.squirrel%40webmail.hotelhot.dk

```
Git v1.6.1: The final checkout fails with an error about merge conflicts.
However, the worktree is clean, and I am not trying to do a merge.

Is this a known issue? If so, what is the particular issue that we should
avoid?


Regards,
Anders.


cd $(mktemp -d repo.XXXXXX)
git init

echo init >start
git add start
git commit -m A

git branch parallel

mkdir a b
echo x >a/one
echo y >a/two
echo z >b/three
git add .
git commit -m B

git checkout parallel
mkdir -p a/one a/two b
echo xx >a/one/cat
echo yy >a/two/cow
echo zz >b/unrelated
git add .
git commit -m C

# This fails:
git checkout master

```

## Clemens Buchacher, 2009-01-05 16:05

Subject: Re: [BUG] unable to checkout branch with a clean worktree
Message-ID: <20090105160527.GA7718@localhost>
URL: https://gitlist.dev/e/20090105160527.GA7718%40localhost
In-Reply-To: <35079.bFoQE3daRhY=.1231170168.squirrel@webmail.hotelhot.dk>

```
On Mon, Jan 05, 2009 at 04:42:48PM +0100, Anders Melchiorsen wrote:
> Git v1.6.1: The final checkout fails with an error about merge conflicts.
> However, the worktree is clean, and I am not trying to do a merge.
> 
> Is this a known issue? If so, what is the particular issue that we should
> avoid?

This is fixed by the recent patches for verify_absent. (Actually, just PATCH
2/3 should be enough to fix this issue.)

http://article.gmane.org/gmane.comp.version-control.git/104317

```

## Anders Melchiorsen, 2009-01-05 17:54

Subject: Re: [BUG] unable to checkout branch with a clean worktree
Message-ID: <87fxjxk593.fsf@cup.kalibalik.dk>
URL: https://gitlist.dev/e/87fxjxk593.fsf%40cup.kalibalik.dk
In-Reply-To: <20090105160527.GA7718@localhost>

```
Clemens Buchacher <drizzd@aon.at> writes:

> On Mon, Jan 05, 2009 at 04:42:48PM +0100, Anders Melchiorsen wrote:
>> Git v1.6.1: The final checkout fails with an error about merge conflicts.
>
> This is fixed by the recent patches for verify_absent. (Actually,
> just PATCH 2/3 should be enough to fix this issue.)
>
> http://article.gmane.org/gmane.comp.version-control.git/104317

Right, I can confirm that the patch [2/3] fixes this, also in the repo
where the issue originally turned up.


Thanks,
Anders.

```
