git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Palka <patrick@parcs.ath.cx>
To: git@vger.kernel.org
Subject: git-reset does not seem to respect GIT_WORK_TREE
Date: Fri, 14 Feb 2014 13:57:36 -0500	[thread overview]
Message-ID: <CA+C-WL_x=+OPn4Ec-6Y13w1+dd5G5v8W6=i15WH47pyP3ggjuw@mail.gmail.com> (raw)

Hi everyone,

I noticed that git-reset does not seem to respect GIT_WORK_TREE.  Here
is a simplified test case:

$ mkdir src_dir && cd src_dir
$ git init
$ touch A && git add A && git commit -m "Dummy commit."
$ mkdir ../build_dir && cd ../build_dir
$ export GIT_WORK_TREE=../src_dir
$ export GIT_DIR=../src_dir/.git
$ git reset
Unstaged changes after reset:
D       A

The final command "git reset" erroneously suggests that the file "A"
does not exist in the working tree.  Does anybody know why git-reset
behaves this way?

Thanks,
Patrick

             reply	other threads:[~2014-02-14 18:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 18:57 Patrick Palka [this message]
2014-02-15  9:14 ` [PATCH] reset: setup worktree on --mixed Nguyễn Thái Ngọc Duy
2014-02-15  9:38   ` Duy Nguyen
2014-02-16  2:28   ` [PATCH v2] reset: optionally setup worktree and refresh index " Nguyễn Thái Ngọc Duy
2014-02-16  2:29     ` Eric Sunshine
2014-02-16 18:19     ` Patrick Palka

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='CA+C-WL_x=+OPn4Ec-6Y13w1+dd5G5v8W6=i15WH47pyP3ggjuw@mail.gmail.com' \
    --to=patrick@parcs.ath.cx \
    --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).