]> git.ipfire.org Git - thirdparty/git.git/commit
rev-parse: --show-cdup
authorJunio C Hamano <junkio@cox.net>
Fri, 23 Dec 2005 06:35:38 +0000 (22:35 -0800)
committerJunio C Hamano <junkio@cox.net>
Fri, 23 Dec 2005 06:35:38 +0000 (22:35 -0800)
commit5f94c730f31862c7f500173ee3a9d141c4730f0b
treee2123685937d061759aa00d483ee46e3aa2dc3ad
parentc10d63451883f67c37622d2a21b2fc93be2f90c9
rev-parse: --show-cdup

When --show-prefix is useful, sometimes it is easier to cd up to
the toplevel of the tree.  This is equivalent to:

    git rev-parse --show-prefix | sed -e 's|[^/][^/]*|..|g'

but we do not have to invoke sed for that.

Signed-off-by: Junio C Hamano <junkio@cox.net>
Documentation/git-rev-parse.txt
rev-parse.c