From: Thomas Rast <tr@thomasrast.ch>
To: "Øystein Walle" <oystwa@gmail.com>,
"Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git stash doesn't honor --work-tree or GIT_WORK_TREE
Date: Sun, 01 Dec 2013 12:12:48 +0100 [thread overview]
Message-ID: <874n6sddu7.fsf@thomasrast.ch> (raw)
In-Reply-To: <loom.20131130T221443-682@post.gmane.org> ("Øystein Walle"'s message of "Sat, 30 Nov 2013 21:22:01 +0000 (UTC)")
Øystein Walle <oystwa@gmail.com> writes:
> Aaron Brooks <aaron <at> brooks1.net> writes:
>
>> Unlike other commands, git stash doesn't work outside of the worktree,
>> even when --work-tree is specified:
[...]
> The environment variables are properly exported. I verified this by
> adding 'echo $GIT_WORK_TREE; echo $GIT_DIR' at the top of git-stash.sh.
> So these should propagate to "child gits" just fine, and so it shouldn't
> be necessary to test them explicitly.
>
> The problem seems to be that git rev-parse --is-inside-work-tree does
> not honor these. In fact it doesn't even honor --git-dir or --work-tree.
> Judging by the name this may be intentional.
Thanks for investigating this.
Duy, you are the expert on the worktree detection logic. Do you know if
there is a reason for --is-inside-work-tree to not honor the
GIT_WORK_TREE / GIT_DIR overrides?
--
Thomas Rast
tr@thomasrast.ch
next prev parent reply other threads:[~2013-12-01 11:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-30 19:04 git stash doesn't honor --work-tree or GIT_WORK_TREE Aaron Brooks
2013-11-30 21:22 ` Øystein Walle
2013-12-01 11:12 ` Thomas Rast [this message]
2013-12-01 11:50 ` Duy Nguyen
2013-12-01 15:50 ` Thomas Rast
2013-12-02 18:01 ` Junio C Hamano
2013-12-01 19:12 ` Øystein Walle
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=874n6sddu7.fsf@thomasrast.ch \
--to=tr@thomasrast.ch \
--cc=git@vger.kernel.org \
--cc=oystwa@gmail.com \
--cc=pclouds@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.