From: Andreas Ericsson <ae@op5.se>
To: Jakub Narebski <jnareb@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [RFC/PATCH] Implement poor-man's submodule support in pre-commit hook
Date: Wed, 20 Dec 2006 13:35:34 +0100 [thread overview]
Message-ID: <45892E16.2040301@op5.se> (raw)
In-Reply-To: <emb8h2$io4$1@sea.gmane.org>
Jakub Narebski wrote:
> Brian Gernhardt wrote:
>
>> On Dec 20, 2006, at 5:08 AM, Andy Parkins wrote:
>>
>>> Hello,
>>>
>>> Help...
>>>
>>>> +if [ -f .gitmodules ]; then
>>> This doesn't work because git-commit is not necessarily in the root
>>> of the
>>> working tree. How do I safely get that root? While ${GIT_DIR}/..
>>> would work
>>> it is not guaranteed.
>> The way to do that seems to be "git rev-parse --git-dir". I'm not
>> sure why it's not just "git --git-dir" or similar (probably just
>> historical reasons), but there you go.
>
> Because it is "git --git-dir=<PATH>" to set it (probably).
> Although it is not insurmountable difficulity...
AFAIR, the discussions long ago went along the lines of "if no argument
is passed to any of the --*-dir options, print out the current value".
If "git --git-dir" doesn't print the directory name of the .git
directory inside the repo you're currently in, I'd consider it a bug.
--
Andreas Ericsson andreas.ericsson@op5.se
OP5 AB www.op5.se
next prev parent reply other threads:[~2006-12-20 12:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-12-20 9:01 [RFC/PATCH] Implement poor-man's submodule support in pre-commit hook Andy Parkins
2006-12-20 10:08 ` Andy Parkins
2006-12-20 11:49 ` Brian Gernhardt
2006-12-20 12:01 ` Jakub Narebski
2006-12-20 12:35 ` Andreas Ericsson [this message]
2006-12-20 14:47 ` [BUG] git --git-dir dies with bus error Brian Gernhardt
2006-12-20 11:59 ` [RFC/PATCH] Implement poor-man's submodule support in pre-commit hook Jakub Narebski
2006-12-20 12:11 ` Andy Parkins
2006-12-20 19:37 ` Junio C Hamano
2006-12-21 8:39 ` Andy Parkins
2006-12-21 8:49 ` Junio C Hamano
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=45892E16.2040301@op5.se \
--to=ae@op5.se \
--cc=git@vger.kernel.org \
--cc=jnareb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).