You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I ask git_merge(), my expectation is that a merge commit is created even if the merge doesn't change any files, at least with the default squash = FALSE. Should there be an argument to control that?
# Init repogert::git_init("test")
setwd("test")
gert::git_config_set("user.name", "Donald Duck")
gert::git_config_set("user.email", "[email protected]")
writeLines(character(), ".gitignore")
gert::git_add(".gitignore")
#> file status staged#> 1 .gitignore new TRUEgert::git_commit("initial")
#> [1] "4fc8e328ab9f41bc65b6c70491afd67b5f518127"# Create test-branchgert::git_branch_create("test-branch")
gert::git_branch_checkout("test-branch")
#> <git repository>: /private/var/folders/dj/yhk9rkx97wn_ykqtnmk18xvc0000gn/T/RtmpsGahGN/reprex-12ae94e3d20a5-gaudy-geese/test[@test-branch]
writeLines("a", "a.txt")
gert::git_add("a.txt")
#> file status staged#> 1 a.txt new TRUEgert::git_commit_all("Create a.txt")
#> [1] "3b57c500961b530159cc34ca6e3735e0ac2d3acc"
unlink("a.txt")
gert::git_commit_all("Remove a.txt")
#> [1] "956e9280e279ccc295768c471b156a7c5f54ed60"gert::git_log()
#> commit author#> 1 956e9280e279ccc295768c471b156a7c5f54ed60 Donald Duck <[email protected]>#> 2 3b57c500961b530159cc34ca6e3735e0ac2d3acc Donald Duck <[email protected]>#> 3 4fc8e328ab9f41bc65b6c70491afd67b5f518127 Donald Duck <[email protected]>#> time files merge message#> 1 2023-05-31 05:58:46 1 FALSE Remove a.txt\n#> 2 2023-05-31 05:58:46 1 FALSE Create a.txt\n#> 3 2023-05-31 05:58:46 1 FALSE initial\n# Mergegert::git_branch_checkout("main")
#> <git repository>: /private/var/folders/dj/yhk9rkx97wn_ykqtnmk18xvc0000gn/T/RtmpsGahGN/reprex-12ae94e3d20a5-gaudy-geese/test[@main]gert::git_merge("test-branch")
#> Merge did not result in any changes#> NULLgert::git_merge("test-branch")
#> Merge did not result in any changes#> NULL
When I ask
git_merge()
, my expectation is that a merge commit is created even if the merge doesn't change any files, at least with the defaultsquash = FALSE
. Should there be an argument to control that?Created on 2023-05-31 with reprex v2.0.2
The text was updated successfully, but these errors were encountered: