summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-11-10 16:56:39 +0100
committerThomas Haller <thaller@redhat.com>2020-11-10 18:23:36 +0100
commit869ff96ad19645761702dd73bb6fcaaf69c26a11 (patch)
tree69ba900b2d3e91c777a3c89e881ab40fcc5a82b2
parent45cb0ef403b08561cce9502e0203ce6c859bfdff (diff)
downloadNetworkManager-869ff96ad19645761702dd73bb6fcaaf69c26a11.tar.gz
contrib/checkpatch: fix shallow repository for checkpatch script
The checkpatch test tests the patches on the merg-request, as they branch off from master (or one of the stable branches). It thus need the full git history, but the git repository might be a shallow clone. Fix it.
-rwxr-xr-xcontrib/scripts/checkpatch-feature-branch.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/scripts/checkpatch-feature-branch.sh b/contrib/scripts/checkpatch-feature-branch.sh
index 292a429109..c46fcd4b5a 100755
--- a/contrib/scripts/checkpatch-feature-branch.sh
+++ b/contrib/scripts/checkpatch-feature-branch.sh
@@ -20,7 +20,9 @@ else
NM_UPSTREAM_REMOTE="nm-upstream-$(date '+%Y%m%d-%H%M%S')-$RANDOM"
git remote add "$NM_UPSTREAM_REMOTE" https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
BASE_REF="refs/remotes/$NM_UPSTREAM_REMOTE"
+ git fetch origin "$(git rev-parse "$HEAD")" --no-tags --unshallow
git fetch "$NM_UPSTREAM_REMOTE" \
+ --no-tags \
"refs/heads/master:$BASE_REF/master" \
"refs/heads/nm-*:$BASE_REF/nm-*" \
|| die "failure to fetch from https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git"