Skip to content

Commit 167783b

Browse files
committed
test(git): avoid ambiguous commit message pathspec
Signed-off-by: Leonardo trindade miranda <tmonestudio@gmail.com>
1 parent 86fca02 commit 167783b

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎tests/test_git_context.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,7 +308,7 @@ TEST(worktree_status_tracked_modified) {
308308
}
309309
if (th_write_file(TH_PATH(tmp, "tracked.txt"), "v1") != 0 ||
310310
status_git_run(tmp, "add -f -- tracked.txt") != 0 ||
311-
status_git_run(tmp, "commit -qm add tracked") != 0) {
311+
status_git_run(tmp, "commit -q -m add-tracked") != 0) {
312312
th_rmtree(tmp);
313313
FAIL("failed to commit tracked file");
314314
}
@@ -446,7 +446,7 @@ TEST(worktree_status_mixed_tracked_and_untracked) {
446446
}
447447
if (th_write_file(TH_PATH(tmp, "tracked.txt"), "v1") != 0 ||
448448
status_git_run(tmp, "add -f -- tracked.txt") != 0 ||
449-
status_git_run(tmp, "commit -qm add tracked") != 0) {
449+
status_git_run(tmp, "commit -q -m add-tracked") != 0) {
450450
th_rmtree(tmp);
451451
FAIL("failed to commit tracked file");
452452
}

‎tests/test_mcp.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2851,7 +2851,7 @@ TEST(tool_index_status_freshness_verdict_stale_when_tracked_changes) {
28512851
}
28522852
if (th_write_file(TH_PATH(repo, "tracked.txt"), "v1") != 0 ||
28532853
mcp_git_run(repo, "add -f -- tracked.txt") != 0 ||
2854-
mcp_git_run(repo, "commit -qm add tracked") != 0) {
2854+
mcp_git_run(repo, "commit -q -m add-tracked") != 0) {
28552855
th_rmtree(repo);
28562856
FAIL("failed to commit tracked file");
28572857
}
@@ -2959,7 +2959,7 @@ TEST(tool_index_status_freshness_verdict_stale_when_tracked_and_untracked) {
29592959
}
29602960
if (th_write_file(TH_PATH(repo, "tracked.txt"), "v1") != 0 ||
29612961
mcp_git_run(repo, "add -f -- tracked.txt") != 0 ||
2962-
mcp_git_run(repo, "commit -qm add tracked") != 0) {
2962+
mcp_git_run(repo, "commit -q -m add-tracked") != 0) {
29632963
th_rmtree(repo);
29642964
FAIL("failed to commit tracked file");
29652965
}

0 commit comments

Comments
 (0)