linter: Strip trailing / in path for git-subtree-check #17329

pull jnewbery wants to merge 1 commits into bitcoin:master from jnewbery:2019-10-subtree-path changing 1 files +2 −1
  1. jnewbery commented at 3:58 PM on October 31, 2019: member

    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.

  2. [linter] Strip trailing / in path for git-subtree-check
    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.
    60582d6060
  3. fanquake added the label Scripts and tools on Oct 31, 2019
  4. jnewbery commented at 3:59 PM on October 31, 2019: member

    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
    
  5. laanwj commented at 4:03 PM on October 31, 2019: member

    ACK 60582d6060542c1e3a23141ea825e36818fbbd54

  6. MarcoFalke assigned dongcarl on Oct 31, 2019
  7. MarcoFalke commented at 4:08 PM on October 31, 2019: member

    Assigned the bash script maintainer

  8. fanquake approved
  9. fanquake commented at 4:24 PM on October 31, 2019: member

    ACK 60582d6060542c1e3a23141ea825e36818fbbd54 - tested before and after.

  10. dongcarl commented at 6:47 PM on October 31, 2019: member

    ACK 60582d6060542c1e3a23141ea825e36818fbbd54

    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

  11. fanquake referenced this in commit 811c381ab6 on Oct 31, 2019
  12. fanquake merged this on Oct 31, 2019
  13. fanquake closed this on Oct 31, 2019

  14. jnewbery commented at 6:58 PM on October 31, 2019: member

    Could be improved in the future if we

    git ls-files '*sh' | xargs rm

  15. jnewbery deleted the branch on Oct 31, 2019
  16. MarkLTZ referenced this in commit 13aa001318 on Apr 10, 2020
  17. zkbot referenced this in commit caed4adf50 on Nov 10, 2020
  18. PastaPastaPasta referenced this in commit 665c7bedca on Jun 27, 2021
  19. PastaPastaPasta referenced this in commit 6e8ea370d5 on Jun 28, 2021
  20. PastaPastaPasta referenced this in commit 7d4949be74 on Jun 29, 2021
  21. PastaPastaPasta referenced this in commit 6c5d697351 on Jul 1, 2021
  22. PastaPastaPasta referenced this in commit 2728d3ec1a on Jul 1, 2021
  23. PastaPastaPasta referenced this in commit 2747862848 on Jul 14, 2021
  24. DrahtBot locked this on Dec 16, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-30 12:14 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me