From: "John Keeping" <j...@keeping.me.uk>
Sent: Saturday, November 02, 2013 10:58 AM
On Fri, Nov 01, 2013 at 06:19:51PM -0500, Ville Walveranta wrote:
"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,
I think that's intentional - and it looks like the behaviour has not
changed since these options were added. With the current behaviour
get three possible outcomes from "git
if worktree=$(git rev-parse --is-inside-work-tree 2>/dev/null)
if test "$worktree" = true
echo 'inside work tree'
echo 'in repository, but not in work tree'
echo 'not in repository'
Shouldn't this case which produces "fatal:..." need to be documented in
the man page?
doesn't mention it.
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html