Skip to content

Commit ad49719

Browse files
wrboycejosegonzalez
authored andcommitted
Add git pull support
1 parent 53c58ec commit ad49719

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

‎dokku‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,13 @@ case "$1" in
3838
echo
3939
;;
4040

41+
git-upload-pack)
42+
APP=${2//"'"/} # strip single quotes from the app name: 'app_name' -> app_name
43+
pluginhook pre-pull $APP
44+
cat | git-upload-pack "$DOKKU_ROOT/$APP"
45+
pluginhook post-pull $APP
46+
;;
47+
4148
build)
4249
APP="$2"; IMAGE="dokku/$APP"; CACHE_DIR="$DOKKU_ROOT/$APP/cache"
4350
id=$(cat | docker run -i -a stdin $DOKKU_DISTRO /bin/bash -c "mkdir -p /app && tar -xC /app")

‎plugins/git/commands‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ git_archive_all() {
66
TMP_WORK_DIR=$(mktemp -d)
77
chmod 755 $TMP_WORK_DIR
88
unset GIT_DIR GIT_WORK_TREE
9-
git clone $DOKKU_ROOT/$APP $TMP_WORK_DIR &> /dev/null
9+
git clone -q $DOKKU_ROOT/$APP $TMP_WORK_DIR &> /dev/null
1010
pushd $TMP_WORK_DIR > /dev/null
1111
git config advice.detachedHead false
1212
git checkout $REV &> /dev/null

0 commit comments

Comments
 (0)