Skip to content

Commit 121083e

Browse files
committed
Remove legacy handling of shallow clones
All modern discourse images use 'treeless clones' instead of shallow clones, so we can drop this old logic
1 parent 99c7df0 commit 121083e

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

templates/web.template.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,10 @@ run:
9696
hook: code
9797
cmd:
9898
- sudo -H -E -u discourse git clean -f
99-
# TODO Remove the special handling of shallow clones when everyone uses images without that clone type
100-
- |-
101-
sudo -H -E -u discourse bash -c '
102-
set -o errexit
103-
if [ $(git rev-parse --is-shallow-repository) == "true" ]; then
104-
git remote set-branches --add origin main
105-
git remote set-branches origin $version
106-
git fetch --depth 1 origin $version
107-
else
108-
git fetch --tags --prune-tags --prune --force origin
109-
fi
110-
'
11199
- |-
112100
sudo -H -E -u discourse bash -c '
113101
set -o errexit
102+
git fetch --tags --prune-tags --prune --force origin
114103
if [[ $(git symbolic-ref --short HEAD) == $version ]] ; then
115104
git pull
116105
else

0 commit comments

Comments
 (0)