threads / bug / 16995

[BUG] unable to checkout branch with a clean worktree

Subject: [BUG] unable to checkout branch with a clean worktree

## tl;dr

3 messages between Jan 5, 2009 and Jan 5, 2009.

replies: 2people: 2as markdown or json

Anders Melchiorsen· Jan 5, 2009, 15:42 UTC · lore

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· Jan 5, 2009, 16:05 UTC · re: Anders Melchiorsen · lore

Re: [BUG] unable to checkout branch with a clean worktree

On Mon, Jan 05, 2009 at 04:42:48PM +0100, Anders Melchiorsen wrote:
Show 5 quoted lines
> 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· Jan 5, 2009, 17:54 UTC · re: Clemens Buchacher · lore

Re: [BUG] unable to checkout branch with a clean worktree

Clemens Buchacher <drizzd@aon.at> writes:
Show 7 quoted lines
> 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.

← back to recent threads