bamaer commented on PR #8974:
URL: https://github.com/apache/hop/pull/8974#issuecomment-6230908866

   Thanks @gvdutra, this fixes the case from #8934. I built the PR and ran the 
git plugin tests: all 324 pass, and both new tests fail on main.
   
   **Should fix**
   
   - When the upstream is on a remote other than `origin` (for example 
`feature` tracking `upstream/master`), `pull()` still fetches only `origin` 
(`UIGit.java:777`). It then merges a stale `upstream/master` and reports 
"already up to date" even though upstream has new commits. On main this case 
failed with the NPE; with this PR, nothing happens and no error is shown.
     Suggested fix: fetch the branch's configured remote, `new 
BranchConfig(config, branch).getRemote()`, fall back to `origin`, and skip the 
fetch when the remote is `.` (the upstream is a local branch). With that 
change, a test with a second remote pulls the new commit and the existing tests 
still pass. A variant of `testPullFromConfiguredUpstreamWithDifferentName` with 
a second remote would cover it.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to