Conversation
| #' @export | ||
| commit_version <- function() { | ||
| amending <- commit_version_impl() | ||
| commit_version <- function(pull = TRUE) { |
There was a problem hiding this comment.
actually the default should be FALSE I suppose
|
Thanks. |
So you'd prefer the code if (has_remote_branch(gert::git_branch()) && pull) {
# is the local branch behind?
if (gert::git_ahead_behind()$behind > 0) {
# With pull = TRUE we would fetch always and always uncommit + commit if behind master
gert::git_pull(rebase = TRUE)
}
}
to be directly in Another question: is the default |
|
I'd wrap that code in a function and call it only from Rethinking offline work. If we're offline, or if PATs are unset, everything should still work, but require opt-in. Otherwise, the default should be to require connectivity and PATs, and do everything that's needed to keep the work in sync. Perhaps we need |
Should this be a separate issue?
One way to lose less information when offline is
But offline, one would still not have the info on PR attribution. Maybe for that too it'd be good to ensure the info is stored in the commit messages via "Co-Authored-by". |
krlmlr
left a comment
There was a problem hiding this comment.
Thanks. Now that everything's on GHA, this becomes much lower priority.
| #' amended a commit. | ||
| tag <- tag_version(force) | ||
| #' 1. git pull with rebase if `pull = TRUE`. | ||
| if (has_remote_branch(gert::git_branch()) && pull) { |
There was a problem hiding this comment.
Should pull = TRUE fail if there's a remote branch?
Co-authored-by: krlmlr <krlmlr@users.noreply.github.com>
Fix #39
Not ready, I need some clarifications. (maybe a concrete example of a stage where
pull=TRUEmakes sense, as well as a concrete example of a stage wherepull=FALSEmakes sense).