Re: how to access working tree from .git dir?

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

Re: how to access working tree from .git dir?

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:43:34

Josh England [off-list ref] writes:
On Fri, 2007-09-07 at 15:12 -0700, Junio C Hamano wrote:
quoted
Josh England [off-list ref] writes:
quoted
OK. Fair enough.  Maybe it would be good to note in git-sh-setup.sh that
many of the supplied functions will not work when called from within
$GIT_DIR.
Sorry, "supplied functions"?  Care to clarify with a patch?
I guess really just the cd_to_topdir() function.  It will silently fail
when run from within $GIT_DIR.
Ah, I see what you meant.

I think you probably are supposed to check with is_bare_repository
or something before calling that, as asking to cd to toplevel
implies you know there is such a thing as toplevel ;-)

Re: how to access working tree from .git dir?

From: Josh England <hidden>
Date: 2016-06-15 22:43:34

On Fri, 2007-09-07 at 16:42 -0700, Junio C Hamano wrote:
Josh England [off-list ref] writes:
quoted
On Fri, 2007-09-07 at 15:12 -0700, Junio C Hamano wrote:
quoted
Josh England [off-list ref] writes:
quoted
OK. Fair enough.  Maybe it would be good to note in git-sh-setup.sh that
many of the supplied functions will not work when called from within
$GIT_DIR.
Sorry, "supplied functions"?  Care to clarify with a patch?
I guess really just the cd_to_topdir() function.  It will silently fail
when run from within $GIT_DIR.
Ah, I see what you meant.

I think you probably are supposed to check with is_bare_repository
or something before calling that, as asking to cd to toplevel
implies you know there is such a thing as toplevel ;-)
That's fine.  I guess using `$GIT_DIR/../` as you mentioned before will
just have to work.

-JE
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help