From 83d6876376bc4765b2f84f76f5ef61708aa3a836 Mon Sep 17 00:00:00 2001 From: Chris Kleeschulte Date: Fri, 7 Aug 2015 12:46:23 -0400 Subject: [PATCH] Git versions - using --branch with Git version < 2.x will not work - doing things the "hard" way --- bin/build | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/bin/build b/bin/build index 8ace8c32..bb3f8b8a 100755 --- a/bin/build +++ b/bin/build @@ -120,10 +120,11 @@ apply the current patch from "${root_dir}"/etc/bitcoin.patch? (y/N): " get_patch_file echo "attempting to checkout tag: ${tag} of bitcoin from github..." cd "${root_dir}" - git clone --depth 1 --branch "${tag}" https://github.com/bitcoin/bitcoin.git libbitcoind - - cd "${btc_dir}" - + #versions of git prior to 2.x will not clone correctly with --branch + git clone --depth 1 https://github.com/bitcoin/bitcoin.git libbitcoind + cd "${btc_dir}" + git fetch --tags + git checkout "${tag}" echo '../patch-bitcoin.sh' "${btc_dir}" ../bin/patch-bitcoin "${btc_dir}"