Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git-commit-each: expand shard handling #19

Merged

Conversation

samford
Copy link
Contributor

@samford samford commented Sep 21, 2024

Besides a-z shard directories, homebrew/cask also has numeric ones like 0, 1, etc., as well as multi-level font directories like font/font-0, font/font-a, etc. The existing patterns in git-commit-each don't handle these directories, so I recently encountered commit messages like 8/8bitdo-ultimate-software: update url, livecheck and font/font-h/font-hermit: update homepage when using this script.

This updates git-commit-each to handle these directories as well. I've set up the font pattern so it will handle the existing font/font-a structure but would also handle files in font/ itself. That said, it appears that sed on macOS can't handle optional groups like (something)? without enabling support for extended regular expressions (-E), so I've used {0,1} to achieve the same goal.

Besides a-z shard directories, homebrew/cask also has numeric ones
like `0`, `1`, etc., as well as multi-level `font` directories like
`font/font-0`, `font/font-a`, etc. The existing patterns in
`git-commit-each` don't handle these directories, so I recently
encountered commit messages like `8/8bitdo-ultimate-software: update
url, livecheck` and `font/font-h/font-hermit: update homepage` when
using this script.

This updates `git-commit-each` to handle these directories as well.
I've set up the font pattern so it will handle the existing
`font/font-a` structure but would also handle files in `font/`
itself. That said, it appears that `sed` on macOS can't handle
optional groups like `(something)?` without enabling support for
extended regular expressions (`-E`), so I've used `{0,1}` to achieve
the same goal.
@MikeMcQuaid MikeMcQuaid merged commit b20201a into MikeMcQuaid:main Sep 22, 2024
3 checks passed
@MikeMcQuaid
Copy link
Owner

Thanks @samford!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants