mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-12 20:24:04 +02:00
Merge branch 'ci-check-remote-exist' into 'master'
Check if the remote already exists before adding it. See merge request GNOME/glib!1901
This commit is contained in:
@@ -11,7 +11,9 @@ ancestor_horizon=28 # days (4 weeks)
|
|||||||
# Limit the fetch to a certain date horizon to limit the amount of data we get.
|
# Limit the fetch to a certain date horizon to limit the amount of data we get.
|
||||||
# If the branch was forked from origin/master before this horizon, it should
|
# If the branch was forked from origin/master before this horizon, it should
|
||||||
# probably be rebased.
|
# probably be rebased.
|
||||||
git remote add upstream https://gitlab.gnome.org/GNOME/glib.git
|
if ! git ls-remote --exit-code upstream >/dev/null 2>&1 ; then
|
||||||
|
git remote add upstream https://gitlab.gnome.org/GNOME/glib.git
|
||||||
|
fi
|
||||||
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" upstream
|
git fetch --shallow-since="$(date --date="${ancestor_horizon} days ago" +%Y-%m-%d)" upstream
|
||||||
|
|
||||||
# Work out the newest common ancestor between the detached HEAD that this CI job
|
# Work out the newest common ancestor between the detached HEAD that this CI job
|
||||||
|
Reference in New Issue
Block a user