From 9335d2eb86a13f5b40d0e01c702d52c24d4af062 Mon Sep 17 00:00:00 2001 From: Auke Kok Date: Wed, 4 Sep 2024 19:52:40 -0400 Subject: [PATCH] Don't --track when checking out a tag. I've pushed a tag/release to scoutfs-xfstests-dev instead of a full blown branch. This seems simpler and cleaner than using branches, because we're going to end up rebasing these things a lot. However, we can't --track tags, so, if the branch name passed to -x is actually a tag instead of a branch, we have to omit the --track option here. Signed-off-by: Auke Kok --- tests/tests/xfstests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/tests/xfstests.sh b/tests/tests/xfstests.sh index 53dbc0f6..f2850a62 100644 --- a/tests/tests/xfstests.sh +++ b/tests/tests/xfstests.sh @@ -30,8 +30,13 @@ t_quiet mkdir -p "$T_TMPDIR/mnt.scratch" t_quiet cd "$T_XFSTESTS_REPO" if [ -z "$T_SKIP_CHECKOUT" ]; then t_quiet git fetch + # if we're passed a tag instead of a branch, we can't --track + TRACK="--track" + if git tag -l | grep -q "$T_XFSTESTS_BRANCH" ; then + TRACK="" + fi # this remote use is bad, do better - t_quiet git checkout -B "$T_XFSTESTS_BRANCH" --track "origin/$T_XFSTESTS_BRANCH" + t_quiet git checkout -B "$T_XFSTESTS_BRANCH" ${TRACK} "origin/$T_XFSTESTS_BRANCH" fi t_quiet make t_quiet sync