fskorgen opened a new issue, #7400:
URL: https://github.com/apache/hop/issues/7400

   ### Apache Hop version?
   
   2.18.1
   
   ### Java version?
   
   21
   
   ### Operating system
   
   Windows
   
   ### What happened?
   
   ### Summary
   In the Git Commit perspective, the **Commit and Push** button creates the 
commit locally but nothing is pushed to the remote. No error is shown — the 
commit succeeds and the push is a silent no-op.
   
   ### Environment
   - Hop version: 2.18.x (also present on current `master`)
   - Plugin: `plugins/misc/git`
   - OS: Windows 11 (not OS-specific)
   
   ### Steps to reproduce
   1. Open a project backed by a git repository with a configured remote.
   2. Go to the **Git Commit** perspective.
   3. Select one or more changed files and enter a commit message.
   4. Click **Commit and Push...**.
   
   ### Expected
   The commit is created and pushed to the remote (with credential handling and 
a success/error message), same as the **Push** action in the Git perspective / 
context menu.
   
   ### Actual
   The commit is created locally, but nothing reaches the remote. No push 
feedback and no error dialog appear.
   
   ### Root cause
   `GitCommitPerspective.commitFiles(boolean push)` calls the **raw JGit** 
`Git.push()` on the object returned by `uiGit.getGit()`:
   
       Git git = uiGit.getGit();
       ...
       if (push) {
         try {
           git.push();   // raw JGit
         } ...
       }
   
   The raw `Git.push()` sets no `CredentialsProvider`, performs no 
`hasRemote()` check, configures no refspec, and reports no result. With no push 
refspec configured, JGit pushes nothing and returns silently.
   
   Every other push entry point in the plugin instead uses the `UIGit.push()` 
wrapper (`GitGuiPlugin.gitPush()`, `GitPerspective.push()`), which sets the 
credentials provider, checks the remote, prompts/retries on auth failure, and 
shows a success/error message.
   
   ### Suggested fix
   Call the wrapper (`uiGit` is already in scope) instead of the raw JGit 
object:
   
       if (push) {
         try {
           uiGit.push();
         } catch (Exception e) {
           // existing PushError dialog
         }
       }
   
   ### Affected file
   
`plugins/misc/git/src/main/java/org/apache/hop/git/GitCommitPerspective.java` 
(method `commitFiles`, the `git.push()` call in the `if (push)` block)
   
   ### Issue Priority
   
   Priority: 3
   
   ### Issue Component
   
   Component: Hop Gui


-- 
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