From: Nguyen Thai Ngoc Duy Date: Tue, 29 Dec 2009 08:38:28 GMT Subject: Re: Possible bug in 1.6.6 with reset --hard and $GIT_WORK_TREE Message-ID: In-Reply-To: <1a04eebf0912282247p6975a96el8076cb39378bd104@mail.gmail.com> On 12/29/09, Fyn Fynn wrote: > The exact same git reset command that works in 1.6.4, fails to work > under 1.6.6: > > $ GIT_WORK_TREE=$HOME/rawdata/ GIT_DIR=$HOME/rawdata/.git > /usr/local/git-1.6.6/bin/git reset --hard > fatal: hard reset requires a work tree > $ GIT_WORK_TREE=$HOME/rawdata/ GIT_DIR=$HOME/rawdata/.git > /usr/local/git-1.6.4/bin/git reset --hard > HEAD is now at 77ec73f... > > What gives? A recent patch by Jeff (952dfc6 (reset: improve worktree safety valves - 2009-12-04)) makes sure that "git reset --hard" will not work outside worktree (which is right). Where was your current directory, inside $GIT_WORK_TREE or outside? -- Duy