Re: [git-users] Problem using detached worktrees with commands implemented in scripts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Junio C Hamano" <gitster@xxxxxxxxx>
"Philip Oakley" <philipoakley@xxxxxxx> writes:

From: "Junio C Hamano" <gitster@xxxxxxxxx>
"Philip Oakley" <philipoakley@xxxxxxx> writes:

... and the detection process for 'toplevel' may not work
properly when in a separated work-tree environment.

Without GIT_WORK_TREE exported to point at the top-level, there is
nothing that lets us "detect" it, as the working tree does not have
".git" directory to tell us to stop, no?


"No", but not in that way.

My point (to Dale) was, as you state, that the "cd to top level" was
(IIUC) the probable causes of the fault, and that a documentation
update would probably be appropriate for the discussion on exporting
GIT_WORK_TREE, and that it would specifically mention those git
commands that needed to "cd to top level", and hence would not work in
such an environment. (I wasn't sure where the appropriate "cd to top
level" function was)

An explanation here on the list wouldn't solve the problems for others
who are yet to make the same mistake, hence the implied suggestion.

I understand what you mean by these last two lines. It was unclear
to me which part of our documentation needs updating and how, and
that was (and still is) what I was primarily interested in finding
out.

I was expecting that the places would be in git(1) [git.txt] and config(1) [config.txt], in the enironment variables GIT_WORK_TREE section and core.worktree sections repectively. However what the right text would be hasn't been fully determined yet, as it should be clear about which commands don't follow the stated 'rules'. Dale's use case does appear to be stretching...

Philip
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]