From: "Øystein Walle" <oystwa@gmail.com>
To: git@vger.kernel.org
Subject: Re: Git 1.8.4.2: 'git-rev-parse --is-inside-git-dir' wrong output!
Date: Sat, 2 Nov 2013 10:24:36 +0000 (UTC) [thread overview]
Message-ID: <loom.20131102T110932-618@post.gmane.org> (raw)
In-Reply-To: CACbqpSvU4qxc0WtquP6Eq8bZGjLxTrVhtT2Nqw90wb23ESkfcw@mail.gmail.com
Ville Walveranta <walveranta <at> gmail.com> writes:
>
> "git-rev-parse --is-inside-git-dir" outputs "fatal: Not a git
> repository (or any of the parent directories): .git", instead of
> "false" when outside of a git directory. "--is-inside-work-tree"
> behaves the same way. Both commands work correctly (i.e. output
> "true") when inside a git directory, or inside a work tree,
> respectively.
>
> To test, I installed git 1.8.4.2 initially from
> https://launchpad.net/~git-core/+archive/ppa for Ubuntu 12.04.3, and
> then also compiled it from source, but both seem to behave the same
> way. The problem is not yet present in version 1.7.9.5.
>
> Thanks,
>
> Ville Walveranta
>
Hi,
I thought I'd try to bisect this but I ended up discovering that I get
the exact same behaviour with both 1.7.9.5 and 1.8.4.2. 1.7.9.5 will
also output 'fatal: ...' like 1.8.4.2 does.
Both version will however behave as expected if you provide --git-dir
and --work-tree:
$ pwd
/home/osse
$ git --version
git version 1.8.4.2
$ git --git-dir=/home/osse/git/.git \
--work-tree=/home/osse/git \
rev-parse --is-inside-work-tree
false
Ditto for --is-inside-git-dir.
Incidentally I discovered that the new -C option does *not* behave this
way:
$ git --version
git version 1.8.5.rc0.23.gaa27064
$ git -C /home/osse/git rev-parse --is-inside-work-tree
true
But given that the purpose of the -C option is to make Git behave as if
you were in that directory this is perhaps expected behaviour.
Regards,
Øsse
next prev parent reply other threads:[~2013-11-02 10:25 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 23:19 Git 1.8.4.2: 'git-rev-parse --is-inside-git-dir' wrong output! Ville Walveranta
2013-11-02 10:24 ` Øystein Walle [this message]
2013-11-02 10:58 ` John Keeping
2013-11-02 13:47 ` Philip Oakley
2013-11-02 14:06 ` John Keeping
2013-11-02 17:03 ` Philip Oakley
2013-11-02 19:42 ` Ville Walveranta
2013-11-02 20:20 ` John Keeping
2013-11-02 22:58 ` Ville Walveranta
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=loom.20131102T110932-618@post.gmane.org \
--to=oystwa@gmail.com \
--cc=git@vger.kernel.org \
/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).