Re: [RFC] GIT_WORK_TREE

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

 



Matthias Lederhofer <matled <at> gmx.net> writes:
 
> This series introduces the GIT_WORK_TREE environment variable (and
> core.worktree config option) to specify the working tree that should
> be used with the repository (not for repositories found as .git
> directory).  This allows to separate the repository and working tree.

Hi,

a question regarding GIT_WORK_TREE and (possibly) a suggestion...

If I am not wrong, with this we detach the WT from the REPO by letting git know
our working tree if the working tree does not include a repo (.git) directory.
And this is done either:
- by setting the GIT_WORK_TREE environment variable whenever needed
- by passing the --work-tree parameter to git when needed
- by setting the core.worktree config option in the git repo, so that the
repository knows where its default work tree is...

Is this correct? or am I missing some other ways?

Would it make sense to make the _WT_ know where its repo is?

I.e. having something like a .git-repo file a the top dir of a WT, so that when
git is invoked within the WT it can scan up the WT until it finds the .git-repo
file and automatically decide that GIT_WORK_TREE is at the dir containing that
.git-repo file and that GIT_DIR is at the file pointed by that .git-repo?

Thanks,

Sergio

-
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]

  Powered by Linux