git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: Fyn Fynn <fynfynn@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Possible bug in 1.6.6 with reset --hard and $GIT_WORK_TREE
Date: Tue, 29 Dec 2009 16:12:41 +0800	[thread overview]
Message-ID: <be6fef0d0912290012m3d64669fw4315960274baecb9@mail.gmail.com> (raw)
In-Reply-To: <1a04eebf0912282247p6975a96el8076cb39378bd104@mail.gmail.com>

Hi,

On Tue, Dec 29, 2009 at 2:47 PM, Fyn Fynn <fynfynn@gmail.com> 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?

perhaps you should also specify the --exec-path option or
GIT_EXEC_PATH environment variable.

Assuming a full installation in /usr/local/git-1.6.6/ and thus that
the git commands are installed at
/usr/local/git-1.6.6/libexec/git-core/, the reset for 1.6.6 would look
like this:

$ GIT_WORK_TREE=$HOME/rawdata/ \
GIT_DIR=$HOME/rawdata/.git \
GIT_EXEC_PATH=/usr/local/git-1.6.6/libexec/git-core/ \
/usr/local/git-1.6.6/bin/git reset --hard

-- 
Cheers,
Ray Chuan

  reply	other threads:[~2009-12-29  8:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-29  6:47 Possible bug in 1.6.6 with reset --hard and $GIT_WORK_TREE Fyn Fynn
2009-12-29  8:12 ` Tay Ray Chuan [this message]
2009-12-29  8:38 ` Nguyen Thai Ngoc Duy
2009-12-29 11:04   ` Nanako Shiraishi
2009-12-29 11:36     ` Nguyen Thai Ngoc Duy
2009-12-29 21:09       ` Fyn Fynn
2009-12-29 21:50         ` Jeff King
2009-12-30  8:47           ` [PATCH] reset: unbreak hard resets with GIT_WORK_TREE Jeff King
2009-12-30 17:54             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be6fef0d0912290012m3d64669fw4315960274baecb9@mail.gmail.com \
    --to=rctay89@gmail.com \
    --cc=fynfynn@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).