From 307bdd54b470d7d5f57aa786451d86b029fa1c20 Mon Sep 17 00:00:00 2001 From: jared Date: Mon, 31 Mar 2025 21:01:39 -0600 Subject: [PATCH 1/2] make what `no commits needed` means more clear --- sections/new-hooks.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sections/new-hooks.md b/sections/new-hooks.md index 70699666..061325b1 100644 --- a/sections/new-hooks.md +++ b/sections/new-hooks.md @@ -106,8 +106,9 @@ interactively: _note_: you may need to provide `--commit-msg-filename` when using this command with hook types `prepare-commit-msg` and `commit-msg`. -a commit is not necessary to `try-repo` on a local -directory. `pre-commit` will clone any tracked uncommitted changes. +Specifying a commit is not necessary to `try-repo` on a local +directory, however, the repository must have at least one commit in its history. +`pre-commit` will clone any tracked uncommitted changes. ```pre-commit ~/work/hook-repo $ git checkout origin/main -b feature From e1dc02473f8837710ec139c95567b9bcab5a7acb Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 03:05:56 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sections/new-hooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sections/new-hooks.md b/sections/new-hooks.md index 061325b1..a99e495e 100644 --- a/sections/new-hooks.md +++ b/sections/new-hooks.md @@ -107,7 +107,7 @@ _note_: you may need to provide `--commit-msg-filename` when using this command with hook types `prepare-commit-msg` and `commit-msg`. Specifying a commit is not necessary to `try-repo` on a local -directory, however, the repository must have at least one commit in its history. +directory, however, the repository must have at least one commit in its history. `pre-commit` will clone any tracked uncommitted changes. ```pre-commit