support squashing commits

Bug #329951 reported by Wesley J. Landaker
114
This bug affects 21 people
Affects Status Importance Assigned to Milestone
bzr-rewrite
Triaged
Wishlist
Unassigned

Bug Description

It would be great if rebase could squash multiple commits into one, e.g.:

bzr rebase-squash -r56..59 -m "New commit message..."

I think this is the main functionality that's missing from bzr rebase vs. git rebase.

Bug #243150 talks about supporting a git-like rebase -i, which when implemented will hopefully support editing and squashing. This bug I filed separately because I think a command-line squash would be useful on it's own, anything you can do interactively should be available as a command, and rebase -i needs code to do this internally anyway, so implementing this feature would be a step forward.

Revision history for this message
Wesley J. Landaker (wjl) wrote :

Just another thought: this feature could be used to emulate git's commit --amend functionality, as that would be essentially the same as:

bzr commit
bzr rebase-squash -r-2..-1

This could even be aliased to "bzr rebase-amend" if you wanted.

This would really make it easier to use bzr in an absolutely-must-have-clean-history working environment such as the Linux kernel or other such large projects.

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

I think a "bzr squash" command would be appropriate, but not sure it should have rebase in the name.

Changed in bzr-rebase:
importance: Undecided → Wishlist
status: New → Triaged
Revision history for this message
Drew Stephens (dinomite) wrote :

I'll second the request for this command to be called "bzr squash". When I first learned about squashing commits with git, it was very confusing to start from the "rebase" command. I now want the functionality in bzr, but I'd like to make things easier on newbies, too!

Revision history for this message
Mattias Eriksson (snaggen) wrote :

squash is a feature I have missed from all my version control system, since I always end up with a lot of "ooops! forgot... " commits. And I agree "bzr squash" it clearer, since I don't think of this as a rebase command.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.