r-lib / gert

Simple git client for R
https://docs.ropensci.org/gert/
Other
146 stars 31 forks source link

Calling `gert::git_conflicts()` crashes R when renamed files contain conflicts #229

Open olivroy opened 1 month ago

olivroy commented 1 month ago

Not sure why, but it works fine when only simple git conflicts happen. (when a git conflicts involves a renamed file)

jeroen commented 1 month ago

Can you try to include example code to show the problem ?

Op vr 12 jul. 2024 21:28 schreef olivroy @.***>:

Not sure why, but it works fine when only simple git conflicts happen.

— Reply to this email directly, view it on GitHub https://github.com/r-lib/gert/issues/229, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABUZ77JXE7P2ULRYJ22XV3ZMAU4ZAVCNFSM6AAAAABKZO37RWVHI2DSMVQWIX3LMV43ASLTON2WKOZSGQYDMMRQHEYTCMI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

olivroy commented 1 month ago

It is a bit difficult to simulate a git conflict.

But basically, if I use usethis::pr_merge_main() and I say I want to merge conflicts.

and if a file involved has been renamed.

Possibly the easiest way for you to simulate would be to add something to commit somethign to gert NEWS file on main.

Afterwards, you can use

usethis::pr_fetch(209)
usethis::pr_merge_main()
# Say you want to resolve merge conflicts

To reproduce, you just have to call gert::git_conflicts() in the console.

I use RStudio. I don't know if this is related.