mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-19 22:42:40 +00:00
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 <auke.kok@versity.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user