RE: Annoying absolute path for "core.worktree" to submodule

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

 



> Antony Male wrote:
> On 20/03/2012 9:52 am, Christian Hammerl wrote:
> > Hey folks,
> >
> > I really love the work you are doing on GIT but the last update
> > regarding submodules is a bit annoying. Although the path inside the
> > ".git" file is stored relative to the submodule's path, the path in
> > ".git/modules/path-to-submodule/config" is stored as an absolute
path
> > for "core.worktree".
> 
> What are you referring to as the "last update"? v1.7.8 introduced the
> separate git dir for submodules, and used an absolute path.
> 
> This absolute path was changed to a relative path in the patchset at
> [1], which is present in v1.7.10-rc1.
> 
> [1]: http://thread.gmane.org/gmane.comp.version-control.git/192173

Slightly off topic, but related, what is the recommended way for finding
the git folder from the top level project or any of the submodules? And
of finding the working tree from inside a hook script?

Context: One of the (optional) steps in our build process installs
pre-commit hooks into the git/hooks folder of the tools submodule and
into the git/hooks folder of the next level up project. Then on commit
the hook reads the config file from inside the tools submodule and
checks file formats and naming standards before permitting the commit.
The current implementation has the paths hard coded between the two
location, now with some having the old layout and some the new, we are
looking for a consistent solution without duplicating the logic in the
git executables.

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