Skip to content

Commit 806f1f5

Browse files
committed
aaah
1 parent c71a118 commit 806f1f5

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

tests/testthat/_snaps/commit.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
Code
44
log$message
55
Output
6-
[1] "Third commit on feature branch\n" "Second commit on feature branch\n"
7-
[3] "First commit on feature branch\n" "Third commit on main\n"
8-
[5] "Second commit on main\n" "Initial commit on main\n"
6+
[1] "Merged feature into main\n" "Third commit on main\n"
7+
[3] "Second commit on main\n" "Initial commit on main\n"
98

tests/testthat/test-commit.R

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,17 +282,19 @@ test_that("git_log shows commits from merged branches", {
282282
git_add("main2.txt", repo = repo)
283283
git_commit("Second commit on main", repo = repo)
284284

285-
writeLines("third content", file.path(repo, "main3.txt"))
286-
git_add("main3.txt", repo = repo)
287-
git_commit("Third commit on main", repo = repo)
288-
289285
git_branch_create("feature", repo = repo)
290286
git_branch_switch("feature", repo = repo)
291287

292288
writeLines("feature content 1", file.path(repo, "feature1.txt"))
293289
git_add("feature1.txt", repo = repo)
294290
git_commit("First commit on feature branch", repo = repo)
295291

292+
git_branch_switch(main, repo = repo)
293+
writeLines("third content", file.path(repo, "main3.txt"))
294+
git_add("main3.txt", repo = repo)
295+
git_commit("Third commit on main", repo = repo)
296+
git_branch_switch("feature", repo = repo)
297+
296298
writeLines("feature content 2", file.path(repo, "feature2.txt"))
297299
git_add("feature2.txt", repo = repo)
298300
git_commit("Second commit on feature branch", repo = repo)

0 commit comments

Comments
 (0)