author | Junio C Hamano <junkio@cox.net> | |
Fri, 23 Dec 2005 06:35:38 +0000 (22:35 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 23 Dec 2005 06:35:38 +0000 (22:35 -0800) | ||
commit | 5f94c730f31862c7f500173ee3a9d141c4730f0b | |
tree | e2123685937d061759aa00d483ee46e3aa2dc3ad | tree | snapshot |
parent | c10d63451883f67c37622d2a21b2fc93be2f90c9 | commit | diff |
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>
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 | diff | blob | history | |
rev-parse.c | diff | blob | history |