about summary refs log tree commit diff
path: root/src/etc/pre-push.sh
AgeCommit message (Collapse)AuthorLines
2025-09-27Add auto extra-checks in pre-push scriptShunpoco-1/+4
It enables automatic check changes of Python/C++/JS before pushing the changes to remote repository. Those checks happen only when the target type of file is changed. Otherwise it does not install any dependencies (venv and/or node_modules). Note that shellcheck and spellcheck are not included in this change, because: 1. Unlike venv/node_modules, shellcheck is not installed automatically by the command, and 2. spellcheck is built whenever pre-push script is run, it forces developer to wait extra time So not to break the current productivity, this commit skips them.
2025-02-25Skip `tidy` in pre-push hook if the user is deleting a remote branchYotam Ofek-0/+14
2024-06-19remove `GIT_DIR` handling in pre-push hookonur-ozkan-2/+0
This is already handled from bootstrap at https://github.com/rust-lang/rust/blob/a1ca449981e3b8442e358026437b7bedb9a1458e/src/bootstrap/src/utils/helpers.rs#L504-L506. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-06-30User may want to skip tidy check sometimesyukang-1/+5
2023-05-31Fix `src/etc/pre-push.sh` when `build.locked-deps` is already set in config.tomljyn-1/+1
Before, cargo would error: ``` ; git push Running pre-push script /home/jyn/src/rust/x test tidy Building bootstrap Finished dev [unoptimized] target(s) in 0.02s Build stage0 tool tidy (x86_64-unknown-linux-gnu) error: the argument '--locked' cannot be used multiple times Usage: cargo build [OPTIONS] For more information, try '--help'. Build completed unsuccessfully in 0:00:00 error: failed to push some refs to 'github.com:jyn514/rust.git' ```
2023-01-21Pass `--locked` to the x test tidy callAlbert Larsan-1/+1
This allows to fail the push when the `Cargo.lock` file needs to be updated.
2023-01-04adjust comments about pre-push.sh hookKaDiWa-1/+1
2022-12-17Make the pre-push script work on directories with spacesJoshua Nelson-10/+2
As a secondary benefit, it's also a lot simpler.
2022-08-29Don't --bless in pre-push hookTyler Mandry-1/+1
Running with --bless causes the push to succeed if there are fixable formatting changes, but the changes don't make it into the push. We should have the user rerun with --bless (or x.py fmt) and commit the changes themselves (they might want to amend a particular commit, for instance).
2022-04-11pre-push.sh: Use python3 if python is not foundCheng XU-1/+3
Since Python 2 has reached EOL, `python` may not be available in certain systems (e.g., recent macOS). We should use `python3` in this case to avoid error like `python: No such file or directory`.
2021-08-24Make the pre-commit script pre-push insteadJoshua Nelson-0/+23
This should make it substantially less annoying, and hopefully more people will find it useful. In particular, it will no longer run tidy each time you run `git commit --amend` or rebase a branch. This also warns if you have the old script in pre-commit; see the HACK comment for details.