Skip to content

Commit 1f6317d

Browse files
committed
feat(bug-report): include the configured hooks directory in the report output
1 parent abdda98 commit 1f6317d

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

git-branchless/src/commands/bug_report.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,14 +291,16 @@ fn collect_hooks(git_run_info: &GitRunInfo) -> eyre::Result<ReportEntry> {
291291

292292
Ok(ReportEntry::Text(format!(
293293
"
294+
Hooks directory: `{hooks_dir}`
295+
294296
<details>
295-
<summary>Show {} hooks</summary>
297+
<summary>Show {num_hooks} hooks</summary>
296298
297-
{}
299+
{hook_lines}
298300
299301
</details>",
300-
num_hooks,
301-
hook_lines.join("\n")
302+
hooks_dir = hooks_dir.display(),
303+
hook_lines = hook_lines.join("\n")
302304
)))
303305
}
304306

git-branchless/tests/test_bug_report.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ fn test_bug_report() -> eyre::Result<()> {
3636
let stdout = stdout.trim();
3737

3838
insta::assert_snapshot!(stdout, @r###"
39+
Hooks directory: `<repo-path>/.git/hooks`
40+
3941
<details>
4042
<summary>Show 7 hooks</summary>
4143

0 commit comments

Comments
 (0)