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
Describe the bug
First of all, I recently discovered this amazing tool and I've used it to open a bunch of PRs across a few repos. That worked amazingly!
Now I got some review feedback and I'm trying to update those PRs by using git-xargs again. Here's what I did:
git-xargs \
--branch-name "test-branch1" \
--commit-message "Upgrade jira-description-action to use node16" \
--repos ~/repos.txt \
--pull-request-title "SINF-522 Upgrade jira-description-action to use node16" \
--pull-request-description "Because the latest version uses node 16" \
--loglevel DEBUG \
/tmp/2.sh
The intention is that I want git-xargs to run /tmp/2.sh to addresses the feedback on the existing PR branch(es) and push the changes. That's the behavior of git-xargs when the branch already exists. However, git-xargs seems to ignore the existing remote branch and creates a new local branch with the same name. When it tries to push the branch to remote, it will report this error:
Error="non-fast-forward update"
Why is git-xargs not making changes to the existing branch?
To Reproduce
See above
// paste code snippets here
Expected behavior
git-xargs should make changes to the existing branch.
Nice to have
Terminal output
Screenshots
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
I can confirm the bug. I have checked as well the source code and bug is in logic of method checkoutLocalBranch which clones repository, then it creates on top of the remote repository HEAD (usually default branch is configured develop/master/main) new local branch and then it tries to pull remote brach, which might fail if it can't be fast forwarded from locally, created branch on top of HEAD, to remote branch.
Instead code should try to checkout branch locally after clone repo and if it will fail then it should create new branch...
navrkald
pushed a commit
to navrkald/git-xargs
that referenced
this issue
Feb 14, 2024
Describe the bug
First of all, I recently discovered this amazing tool and I've used it to open a bunch of PRs across a few repos. That worked amazingly!
Now I got some review feedback and I'm trying to update those PRs by using git-xargs again. Here's what I did:
The intention is that I want git-xargs to run
/tmp/2.sh
to addresses the feedback on the existing PR branch(es) and push the changes. That's the behavior of git-xargs when the branch already exists. However, git-xargs seems to ignore the existing remote branch and creates a new local branch with the same name. When it tries to push the branch to remote, it will report this error:Error="non-fast-forward update"
Why is git-xargs not making changes to the existing branch?
To Reproduce
See above
// paste code snippets here
Expected behavior
git-xargs should make changes to the existing branch.
Nice to have
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: