This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This is frequently used in Git world by some people as it gives you possibility to do things like fix commit message or remove/add/modify some files from your last commit.
Realmente faz falta. Aguardo ansioso por esse acréscimo a este módulo.
> Realmente faz falta. Aguardo ansioso por esse acréscimo a este módulo. English, please
(In reply to comment #2) > > Realmente faz falta. Aguardo ansioso por esse acréscimo a este módulo. > English, please Sorry! I said: I truly miss. I await this addition in this module. (by Google Translate)
Would it help if I'd volunteer to work on it and submit a patch?
(In reply to comment #4) > Would it help if I'd volunteer to work on it and submit a patch? Sure, you would be more than welcome.
... let me know if you need any help from me.
BTW, isn't git commit --amend exactly the same as: 1) Team -> Git -> Reset (select --soft option) 2) Team -> Git -> Commit again ? ... which is already possible in the IDE?
The effect is the same, but git users are used to be able to just select "amend" to do it at once. In Eclipse, there is just a checkbox, which picks the amended commit's message if checked. Our team comes from Eclipse and I'm trying to see if we could use Netbeans instead, but this feature will surely be discussed. Thanks for your help, I could use some. I'm an experienced Java developper (mostly Java EE, lots of Swing in the past), but only played with Netbeans platform a few times. Which modules are concerned? Is there some doc on how to debug an ide module? The fix is probably rather trivial, so I could just replace the module and restart, but I guess there are better tools.
Created attachment 130141 [details] Proposed patch for this functionnality Here is a first working version: - "amend" check box in commit dialog - clicking "amend" alos selects HEAD's commit message - double clicking on a row on table opens a diff, without having to go through popup menu
thanks for the patch, i have several comments. OV1 - the checkbox is incorrectly positioned, should be under the Author and Committer fields, not in the dialog's right upper corner. That's a detail, i can fix it myself. OV2 - when getting the commit message the UI is blocked: > Task task = logCommitDialogProgressSupport.start(rp, repository, preparingMessage); > task.waitFinished(); calling waitFinished will successfully block the UI and the IDE becomes unresponsive until the git command finishes. It has to be moved to a background thread, preferably to the preparation phase: GitCommitPanel.getProgressSupport Additionally the checkbox should be disabled (setEnabled(false)) until the message is acquired. OV3 - use simpler method to get the message: GitClient.log(String, ProgressMonitor): > getClient().log(GitUtils.HEAD, getProgressMonitor()); that will yield the last commit directly. OV4 - amended commit cannot be finished until there are modified files. When you just want to modify the last commit message without changing any files, there's no way to finish the commit. GitCommitTable.containsCommitable has to be modify to reflect selected "amend" checkbox. In other words when the checkbox is selected the commit dialog's commit button can be enabled.
OV5 - please also remove the part with dbl-click opening a diff window. This is covered in bug #223178 and i already have a patch prepared for it. Just waiting for the right time to integrate it (probably beginning of the next week)
Created attachment 130195 [details] another try Here is another try, mainly to see if it's what you intended. Still, I think we should simplify all of this (still volunteering to do so in later patchset).
> Here is another try, mainly to see if it's what you intended. Yes, that solves my previous issues. > Still, I think we should simplify all of this (still volunteering to do so in later patchset). Be my guest, but file another issue for that and let's discuss this separately. I do not want to mix two different issues into one.
Created attachment 130782 [details] api change with tests
Created attachment 130783 [details] usage of the api
Kindly asking for a patch review, the API change is in "api change with tests"
The API change is simple, only one method was added: GitClient.commit(File[], String, GitUser, GitUser, boolean, ProgressMonitor)
if there are no objections, i will integrate tomorrow.
Thanks for the patch, thanks for the review. Integrated as http://hg.netbeans.org/core-main/rev/87dc70e52280
Integrated into 'main-golden', will be available in build *201302070001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/87dc70e52280 User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #215636 - Support for 'git commit --amend'