Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 351432 - Add git merge --squash
Summary: Add git merge --squash
Status: RESOLVED FIXED
Alias: None
Product: Orion
Classification: ECD
Component: Git (show other bugs)
Version: 0.2   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 1.0 M1   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard: gsoc2012
Keywords:
Depends on: 351806
Blocks: 384713
  Show dependency tree
 
Reported: 2011-07-07 08:03 EDT by Szymon Brandys CLA
Modified: 2012-08-24 08:33 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Szymon Brandys CLA 2011-07-07 08:03:32 EDT
Sometimes while working on a local branch there is a need to squash all commits into another local branch, e.g. master.
Comment 1 Simon Kaegi CLA 2011-07-07 09:30:34 EDT
For good or bad I found I was using this for reviews a fair bit.
Comment 2 Susan McCourt CLA 2012-01-20 18:43:11 EST
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.
Comment 3 Szymon Brandys CLA 2012-01-23 04:23:53 EST
We are blocked by JGit. Tomek, when you are back, could you check what JGit plans are in this area?
Comment 4 Tomasz Zarna CLA 2012-04-04 03:44:18 EDT
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/
Comment 5 Tomasz Zarna CLA 2012-04-30 07:16:36 EDT
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/
Comment 7 Edyta Przymus CLA 2012-07-01 11:45:24 EDT
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.
Comment 8 Szymon Brandys CLA 2012-07-02 10:39:52 EDT
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.
Comment 9 Edyta Przymus CLA 2012-07-03 17:31:49 EDT
Test still missing, but this commit should work fine

https://github.com/edytaprzymus/orion.client/commit/e90d456619f4e0dc4d283b6498fda95e0e825a78
Comment 10 Szymon Brandys CLA 2012-07-04 05:56:16 EDT
Works fine. Please attach tests.
Comment 12 Szymon Brandys CLA 2012-07-10 07:10:51 EDT
https://github.com/edytaprzymus/orion.client/commit/9706f07ab5c9a3276c1d9a734152eb446c67b46a merged to master on eclipse.org.
Comment 13 Edyta Przymus CLA 2012-07-10 08:34:21 EDT
I wrote all this code and have the rights to contribute it to Eclipse under the
eclipse.org web site terms of use.
Comment 14 Szymon Brandys CLA 2012-07-10 09:45:06 EDT
https://github.com/edytaprzymus/orion.server/commit/0c85163ce7139ae7a150efea4a231c08ad86764f merged to master on eclipse.org.
Thanks Edyta. Marking FIXED.
Comment 15 Lothar Werzinger CLA 2012-08-23 17:23:48 EDT
(In reply to comment #14)
> Marking FIXED.

When will this feature be available via the EGit update site?
Comment 16 Tomasz Zarna CLA 2012-08-24 08:33:44 EDT
(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.