Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
glossary: fix and clarify the definition of 'ref'
[gitweb.git]
/
git-sh-setup.sh
diff --git
a/git-sh-setup.sh
b/git-sh-setup.sh
index 2f7835941ecaa48be17b6dd64e64fb0df3db37e2..7a964ad2ff70a8746c52ab30d945ebff95246edd 100644
(file)
--- a/
git-sh-setup.sh
+++ b/
git-sh-setup.sh
@@
-313,3
+313,15
@@
then
}
: ${GIT_OBJECT_DIRECTORY="$GIT_DIR/objects"}
fi
+
+peel_committish () {
+ case "$1" in
+ :/*)
+ peeltmp=$(git rev-parse --verify "$1") &&
+ git rev-parse --verify "${peeltmp}^0"
+ ;;
+ *)
+ git rev-parse --verify "${1}^0"
+ ;;
+ esac
+}