Community
Participate
Working Groups
Sometimes while working on a local branch there is a need to squash all commits into another local branch, e.g. master.
For good or bad I found I was using this for reviews a fair bit.
This is becoming important now that we have more contributors coming on board. Folks tend to work in github until they are ready to contribute. And perhaps committing along the way. But when they are ready to submit a fix, we just want one commit we can cherrypick. I noticed that some folks (Andy from VMWare) are squashing before they contribute, it would be nice to be able to do the squash from Orion. Then they could do their complete workflow in Orion.
We are blocked by JGit. Tomek, when you are back, could you check what JGit plans are in this area?
There is a change adding the option with pending review[1]. I pinged Christian, who commented earlier on that change, two days ago. No response yet. [1] https://git.eclipse.org/r/#/c/4995/
Neither --squash [1] nor --no-commit [2] switch is in JGit's master. Thus it's unlikely Orion is going to have any of those in .5M2. I'm setting the target milestone to optimistic .5. [1] https://git.eclipse.org/r/#/c/4995/ [2] https://git.eclipse.org/r/#/c/4945/
My solution for this: Client part: https://github.com/edytaprzymus/orion.client/commit/4c6de649bf810bea903d123a7b31f19454adb961 Server part: https://github.com/edytaprzymus/orion.server/commit/99d71e0c8a5da833109556f365ee7e910258b6c6
Sorry everyone, I committed changes about server part too fast, this is the correct version: https://github.com/edytaprzymus/orion.server/commit/2ea526e47fd8c9a402000f43640b194c6e519079 However, to run it I had to download the latest JGit build and import it to eclipse and change the dependency saved in Server Sources. This changes are not committed. Please consider it while running this code.
Go to Repositories/[repo]/Branches and try to merge squash there. I get: ReferenceError: refreshStatusCallBack is not defined http://localhost:8080/orion/git/gitCommands.js Line 1129 Moreover I see no tooltip for the new command, we need to request a separate icon for 'merge squash' and tests are missing.
Test still missing, but this commit should work fine https://github.com/edytaprzymus/orion.client/commit/e90d456619f4e0dc4d283b6498fda95e0e825a78
Works fine. Please attach tests.
https://github.com/edytaprzymus/orion.server/commit/745769c235bff124701ed86c0ded64ebd9b11e85 Test added
https://github.com/edytaprzymus/orion.client/commit/9706f07ab5c9a3276c1d9a734152eb446c67b46a merged to master on eclipse.org.
I wrote all this code and have the rights to contribute it to Eclipse under the eclipse.org web site terms of use.
https://github.com/edytaprzymus/orion.server/commit/0c85163ce7139ae7a150efea4a231c08ad86764f merged to master on eclipse.org. Thanks Edyta. Marking FIXED.
(In reply to comment #14) > Marking FIXED. When will this feature be available via the EGit update site?
(In reply to comment #15) > When will this feature be available via the EGit update site? The feature will be added to EGit with bug 382720.