Skip to content

Commit fd9db45

Browse files
committed
Merge #19258: doc: improve subtree check instructions
a4a3fc4 doc: improve subtree check instructions (Sjors Provoost) Pull request description: Running `git-subtree-check.sh` requires adding the subtree repository as a remote. I learned that several years ago and then forgot again. This PR also improves the error message if the subtree commit can't be found. ACKs for top commit: laanwj: ACK a4a3fc4 fanquake: ACK a4a3fc4 - this looks ok. Tree-SHA512: 959bd923726c172d17f9f97f8a56988bf2df5a94d3131e5152a66150b941394cee9e82fdc6b86e09c0ba91d123a496599f07ca454212168d8d301738394c12c8
2 parents cc9d09e + a4a3fc4 commit fd9db45

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

doc/developer-notes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -887,7 +887,7 @@ Others are external projects without a tight relationship with our project. Chan
887887
be sent upstream, but bugfixes may also be prudent to PR against Bitcoin Core so that they can be integrated
888888
quickly. Cosmetic changes should be purely taken upstream.
889889

890-
There is a tool in `test/lint/git-subtree-check.sh` to check a subtree directory for consistency with
890+
There is a tool in `test/lint/git-subtree-check.sh` ([instructions](../test/lint#git-subtree-checksh)) to check a subtree directory for consistency with
891891
its upstream repository.
892892

893893
Current subtrees include:

test/lint/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ maintained:
2323
* for `src/crypto/ctaes`: https://github.com/bitcoin-core/ctaes.git (branch master)
2424
* for `src/crc32c`: https://github.com/google/crc32c.git (branch master)
2525

26+
To do so, add the upstream repository as remote:
27+
28+
```
29+
git remote add --fetch secp256k1 https://github.com/bitcoin-core/secp256k1.git
30+
```
31+
2632
Usage: `git-subtree-check.sh DIR (COMMIT)`
2733

2834
`COMMIT` may be omitted, in which case `HEAD` is used.

test/lint/git-subtree-check.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ fi
8181

8282
# get the tree in the subtree commit referred to
8383
if [ "d$(git cat-file -t $rev 2>/dev/null)" != dcommit ]; then
84-
echo "subtree commit $rev unavailable: cannot compare" >&2
84+
echo "subtree commit $rev unavailable: cannot compare. Did you add and fetch the remote?" >&2
8585
exit
8686
fi
8787
tree_subtree=$(git show -s --format="%T" $rev)

0 commit comments

Comments
 (0)