Skip to content

Commit 8f0dd73

Browse files
committed
Modify the vendor-libsecp file to enable checkout of a pull request
This modification allows running the command `./vendor-libsecp.sh -f pull/1479/head` to obtain MuSig2 components from `bitcoin-core/secp256k1`. This commit may be discarded after merging PR #1479.
1 parent c4c029f commit 8f0dd73

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

secp256k1-sys/vendor-libsecp.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,13 @@ fi
8080
# Check out specified revision
8181
pushd "$DIR" > /dev/null
8282
if [ -n "$SECP_REV" ]; then
83-
git checkout "$SECP_REV"
83+
if [[ "$SECP_REV" == pull/* ]]; then
84+
PR_NUM=$(echo $SECP_REV | sed 's/pull\/\([0-9]*\)\/.*/\1/')
85+
git fetch origin pull/$PR_NUM/head:pr-$PR_NUM
86+
git checkout pr-$PR_NUM
87+
else
88+
git checkout "$SECP_REV"
89+
fi
8490
fi
8591
SOURCE_REV=$(git rev-parse HEAD || echo "[unknown revision from $SECP_VENDOR_SECP_REPO]")
8692
rm -rf .git/ || true

0 commit comments

Comments
 (0)