rev-parse --show-cdup in .git

From: Michael J Gruber <hidden>
Date: 2016-06-15 22:47:49

I'm sure this was discussed somewhere, but I can't find it:

When called from within .git, git rev-parse --show-cdup returns nothing
rather than "..", not even an error code. Is this intended?

This is all the more disturbing since the cwd of hooks seems to be
GIT_DIR. Is that something one can rely upon? In that case one can
simply use ".." for cdup.

Michael

P.S.: The use case is a simple post-receive-hook that fast forwards a
checked out branch on receiving refs in refs/remotes/incoming/, but
needs to check the worktree against the index etc. 1.7.0 may be an
opportunity to encourage usage of this rather than restoring the old
behavior through options.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help