Skip to content

Conversation

jnewbery
Copy link
Contributor

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.

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.
@jnewbery
Copy link
Contributor Author

Before:

→ ./test/lint/git-subtree-check.sh src/univalue
src/univalue in HEAD currently refers to tree e73765406fc0a0fb4796504ea08a2e05cfea8bc0
src/univalue in HEAD was last updated in commit dc287c98f8b33576f3c71db02a232106ef0e57d9 (tree e73765406fc0a0fb4796504ea08a2e05cfea8bc0)
src/univalue in HEAD was last updated to upstream commit 7890db99d693572d27ade3e14268bd7236134529 (tree e73765406fc0a0fb4796504ea08a2e05cfea8bc0)
GOOD
→ ./test/lint/git-subtree-check.sh src/univalue/
ERROR: src/univalue/ is not a subtree

after:

→ ./test/lint/git-subtree-check.sh src/univalue
src/univalue in HEAD currently refers to tree e73765406fc0a0fb4796504ea08a2e05cfea8bc0
src/univalue in HEAD was last updated in commit dc287c98f8b33576f3c71db02a232106ef0e57d9 (tree e73765406fc0a0fb4796504ea08a2e05cfea8bc0)
src/univalue in HEAD was last updated to upstream commit 7890db99d693572d27ade3e14268bd7236134529 (tree e73765406fc0a0fb4796504ea08a2e05cfea8bc0)
GOOD
→ ./test/lint/git-subtree-check.sh src/univalue/
src/univalue in HEAD currently refers to tree e73765406fc0a0fb4796504ea08a2e05cfea8bc0
src/univalue in HEAD was last updated in commit dc287c98f8b33576f3c71db02a232106ef0e57d9 (tree e73765406fc0a0fb4796504ea08a2e05cfea8bc0)
src/univalue in HEAD was last updated to upstream commit 7890db99d693572d27ade3e14268bd7236134529 (tree e73765406fc0a0fb4796504ea08a2e05cfea8bc0)
GOOD

@laanwj
Copy link
Member

laanwj commented Oct 31, 2019

ACK 60582d6

@maflcko
Copy link
Member

maflcko commented Oct 31, 2019

Assigned the bash script maintainer

Copy link
Member

@fanquake fanquake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 60582d6 - tested before and after.

@dongcarl
Copy link
Contributor

ACK 60582d6

Could be improved in the future if we switch to a bash shebang by using something like shopt -s extglob; echo "${DIR%%+(/)}" to remove all trailing slashes

fanquake added a commit that referenced this pull request Oct 31, 2019
60582d6 [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 60582d6
  dongcarl:
    ACK 60582d6
  fanquake:
    ACK 60582d6 - tested before and after.

Tree-SHA512: 5a91979b60e1d4b1310fd02a0ccc5465dbff57d9c94bba81e4758442a627cfa32217ab8f973990a17b5d961ecae61fb56b56ccf10f87e61dd03e88a1e0b8f99d
@fanquake fanquake merged commit 60582d6 into bitcoin:master Oct 31, 2019
@jnewbery
Copy link
Contributor Author

Could be improved in the future if we

git ls-files '*sh' | xargs rm

@jnewbery jnewbery deleted the 2019-10-subtree-path branch October 31, 2019 18:58
MarkLTZ added a commit to litecoinz-core/litecoinz that referenced this pull request Apr 10, 2020
@str4d str4d mentioned this pull request Nov 9, 2020
zkbot added a commit to zcash/zcash that referenced this pull request Nov 10, 2020
Lint fixes

Fixes most lints currently reported by `test/lint/lint-all.sh`.

Includes changes cherry-picked from the following upstream PRs:
- bitcoin/bitcoin#8700
- bitcoin/bitcoin#8840
- bitcoin/bitcoin#9867
  - We backported the second commit in #3146
- bitcoin/bitcoin#10771
- bitcoin/bitcoin#11394
- bitcoin/bitcoin#11649
- bitcoin/bitcoin#17329
- bitcoin/bitcoin#19258
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 27, 2021
…-check

60582d6 [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 60582d6
  dongcarl:
    ACK 60582d6
  fanquake:
    ACK 60582d6 - tested before and after.

Tree-SHA512: 5a91979b60e1d4b1310fd02a0ccc5465dbff57d9c94bba81e4758442a627cfa32217ab8f973990a17b5d961ecae61fb56b56ccf10f87e61dd03e88a1e0b8f99d
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 28, 2021
…-check

60582d6 [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 60582d6
  dongcarl:
    ACK 60582d6
  fanquake:
    ACK 60582d6 - tested before and after.

Tree-SHA512: 5a91979b60e1d4b1310fd02a0ccc5465dbff57d9c94bba81e4758442a627cfa32217ab8f973990a17b5d961ecae61fb56b56ccf10f87e61dd03e88a1e0b8f99d
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jun 29, 2021
…-check

60582d6 [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 60582d6
  dongcarl:
    ACK 60582d6
  fanquake:
    ACK 60582d6 - tested before and after.

Tree-SHA512: 5a91979b60e1d4b1310fd02a0ccc5465dbff57d9c94bba81e4758442a627cfa32217ab8f973990a17b5d961ecae61fb56b56ccf10f87e61dd03e88a1e0b8f99d
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
…-check

60582d6 [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 60582d6
  dongcarl:
    ACK 60582d6
  fanquake:
    ACK 60582d6 - tested before and after.

Tree-SHA512: 5a91979b60e1d4b1310fd02a0ccc5465dbff57d9c94bba81e4758442a627cfa32217ab8f973990a17b5d961ecae61fb56b56ccf10f87e61dd03e88a1e0b8f99d
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 1, 2021
…-check

60582d6 [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 60582d6
  dongcarl:
    ACK 60582d6
  fanquake:
    ACK 60582d6 - tested before and after.

Tree-SHA512: 5a91979b60e1d4b1310fd02a0ccc5465dbff57d9c94bba81e4758442a627cfa32217ab8f973990a17b5d961ecae61fb56b56ccf10f87e61dd03e88a1e0b8f99d
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Jul 14, 2021
…-check

60582d6 [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 60582d6
  dongcarl:
    ACK 60582d6
  fanquake:
    ACK 60582d6 - tested before and after.

Tree-SHA512: 5a91979b60e1d4b1310fd02a0ccc5465dbff57d9c94bba81e4758442a627cfa32217ab8f973990a17b5d961ecae61fb56b56ccf10f87e61dd03e88a1e0b8f99d
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Dec 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants