Print this page
Add git support to which_scm utility
@@ -57,10 +57,11 @@
[ -d "$1/Codemgr_wsdata" ] && scmid="$scmid teamware"
[ -d "$1/.hg" ] && scmid="$scmid mercurial"
[ -d "$1/CVS" ] && scmid="$scmid cvs"
[ -d "$1/.svn" ] && scmid="$scmid subversion"
+ [ -d "$1/.git" ] && scmid="$scmid git"
echo $scmid
}
if [[ -n "$CODEMGR_WS" ]]; then
if [[ ! -d "$CODEMGR_WS" ]]; then
@@ -97,12 +98,12 @@
exit 0
fi
SCM_TYPE="$1"
# We're done searching if we hit either a change in type or the top
# of a "third type" control system.
- if [[ "$SCM_TYPE" != "$CWD_TYPE" || "$SCM_TYPE" == mercurial || \
- "$SCM_TYPE" == teamware ]]; then
+ if [[ "$SCM_TYPE" != "$CWD_TYPE" || "$SCM_TYPE" == git || \
+ "$SCM_TYPE" == mercurial || "$SCM_TYPE" == teamware ]]; then
break
fi
PREVDIR="$DIR"
DIR=$(dirname "$DIR")
done