Ignore the double quotes commit in git blame
This commit is contained in:
parent
ea8f1a13e3
commit
50a0e45309
2 changed files with 16 additions and 2 deletions
5
.git-blame-ignore-revs
Normal file
5
.git-blame-ignore-revs
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Mechanical commits that `git blame` skips
|
||||||
|
# => Enable locally with `git config blame.ignoreRevsFile .git-blame-ignore-revs`
|
||||||
|
|
||||||
|
# Use double quotes
|
||||||
|
ea8f1a13e34bfce01ea66951311e5f5fb5ab967f
|
||||||
13
noxfile.py
13
noxfile.py
|
|
@ -15,7 +15,7 @@ Further sessions run on demand with `uv run nox -s <session>`:
|
||||||
- "deps-lock": Lock dependencies after manual changes in pyproject.toml
|
- "deps-lock": Lock dependencies after manual changes in pyproject.toml
|
||||||
- "deps-upgrade": Upgrade dependencies within their allowed ranges
|
- "deps-upgrade": Upgrade dependencies within their allowed ranges
|
||||||
- "deps-upgrade-check": Show newer versions and the age of all pinned releases
|
- "deps-upgrade-check": Show newer versions and the age of all pinned releases
|
||||||
- "init-project": Install the `pre-commit` hooks
|
- "init-project": Install the `pre-commit` hooks and configure `git blame`
|
||||||
- "clean-cwd": Run approx. `git clean -X` with minor exceptions
|
- "clean-cwd": Run approx. `git clean -X` with minor exceptions
|
||||||
|
|
||||||
Most sessions accept extra arguments after the "--",
|
Most sessions accept extra arguments after the "--",
|
||||||
|
|
@ -450,10 +450,19 @@ def check_dependency_upgrades(session: Session) -> None:
|
||||||
|
|
||||||
@nox.session(name="init-project", python=MAIN_PYTHON, venv_backend="none")
|
@nox.session(name="init-project", python=MAIN_PYTHON, venv_backend="none")
|
||||||
def initialize_project(session: Session) -> None:
|
def initialize_project(session: Session) -> None:
|
||||||
"""Install the `pre-commit` hooks."""
|
"""Install the `pre-commit` hooks and configure `git blame`."""
|
||||||
# .pre-commit-config.yaml sets the hook types via "default_install_hook_types"
|
# .pre-commit-config.yaml sets the hook types via "default_install_hook_types"
|
||||||
session.run("uv", "run", "pre-commit", "install")
|
session.run("uv", "run", "pre-commit", "install")
|
||||||
|
|
||||||
|
# Skip the commits listed in .git-blame-ignore-revs in `git blame`
|
||||||
|
session.run(
|
||||||
|
"git",
|
||||||
|
"config",
|
||||||
|
"blame.ignoreRevsFile",
|
||||||
|
".git-blame-ignore-revs",
|
||||||
|
external=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
@nox.session(name="clean-cwd", python=MAIN_PYTHON, venv_backend="none")
|
@nox.session(name="clean-cwd", python=MAIN_PYTHON, venv_backend="none")
|
||||||
def clean_cwd(session: Session) -> None:
|
def clean_cwd(session: Session) -> None:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue