From b46df06b068df5e7605b06e83fdbbc0fe4bf13c3 Mon Sep 17 00:00:00 2001 From: kroeschl <60117794+kroeschl@users.noreply.github.com> Date: Thu, 15 Sep 2022 13:55:26 -0500 Subject: [PATCH] Don't use `git pull --tags' for compatibility with Git 1.8.3 (#19) --- bin/pyenv-update | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/bin/pyenv-update b/bin/pyenv-update index 9cca345..ddcde6c 100755 --- a/bin/pyenv-update +++ b/bin/pyenv-update @@ -55,7 +55,13 @@ update_repo() { info "Updating $1..." verify_repo "$1" && # pyenv-installer makes the repos shallow, so tags are not fetched by default - ( cd "${repo}" && git pull --tags --no-rebase --ff "${REMOTE}" "${BRANCH_CHOICE}" ) + # Git 1.8.3 (RHEL/CentOS 7)'s `pull' doesn't support `--tags' + # so we have to fetch as a separate step. + ( + cd "${repo}" && \ + git fetch --tags "${REMOTE}" "${BRANCH_CHOICE}" && \ + git merge --ff "${REMOTE}" "${BRANCH_CHOICE}" + ) } info() {