diff options
author | fanquake <fanquake@gmail.com> | 2019-10-31 14:49:02 -0400 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2019-10-31 14:51:36 -0400 |
commit | 811c381ab650399231b68ae723411ab75ae77525 (patch) | |
tree | 867799150f985925ca2e02dba478360c7f5b977e | |
parent | 100fa0a62a29146233f676f7008f9f073af41158 (diff) | |
parent | 60582d6060542c1e3a23141ea825e36818fbbd54 (diff) | |
download | bitcoin-811c381ab650399231b68ae723411ab75ae77525.tar.xz |
Merge #17329: linter: Strip trailing / in path for git-subtree-check
60582d6060542c1e3a23141ea825e36818fbbd54 [linter] Strip trailing / in path for git-subtree-check (John Newbery)
Pull request description:
git-subtree-check fails if the directory is given with a trailing slash,
eg:
```
> test/lint/git-subtree-check.sh src/univalue/
ERROR: src/univalue/ is not a subtree
```
Shell autocompletes will add the trailing slash when autofilling the
path name, which will therefore cause the script to fail.
Just ignore any trailing slash.
ACKs for top commit:
laanwj:
ACK 60582d6060542c1e3a23141ea825e36818fbbd54
dongcarl:
ACK 60582d6060542c1e3a23141ea825e36818fbbd54
fanquake:
ACK 60582d6060542c1e3a23141ea825e36818fbbd54 - tested before and after.
Tree-SHA512: 5a91979b60e1d4b1310fd02a0ccc5465dbff57d9c94bba81e4758442a627cfa32217ab8f973990a17b5d961ecae61fb56b56ccf10f87e61dd03e88a1e0b8f99d
-rwxr-xr-x | test/lint/git-subtree-check.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/lint/git-subtree-check.sh b/test/lint/git-subtree-check.sh index 85e8b841b6..7b5707a17a 100755 --- a/test/lint/git-subtree-check.sh +++ b/test/lint/git-subtree-check.sh @@ -4,7 +4,8 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. export LC_ALL=C -DIR="$1" +# Strip trailing / from directory path (in case it was added by autocomplete) +DIR="${1%/}" COMMIT="$2" if [ -z "$COMMIT" ]; then COMMIT=HEAD |