shears.sh: introduce 'bud' and 'finish' commands
The most common operations during splitting a bunch of commits into
neatly-packaged topic branches are:
1) 'finish': name a branch & mark it for merging at the end, and
2) 'bud': start a new branch from the 'onto' commit
Since multiple branches most often want to branch off from a common base
commit, the 'finish' command implies a 'bud' after marking the HEAD for
later merging.
For example, when given an edit script as this:
pick abcdef Adds an initial README.md file
pick 012345 Adds a FAQ section to the README
pick 987654 Fix an off-by-one bug
you might want to put the first two commits into the 'readme' branch
while the third commit wants to live in the 'fixes' branch. This can be
accomplished by inserting two 'finish' lines:
pick abcdef Adds an initial README.md file
pick 012345 Adds a FAQ section to the README
finish readme
pick 987654 Fix an off-by-one bug
finish fixes
Since 'finish' implies a 'bud', this will result in a rewritten
history like this:
*
3141592 Merge 'fixes' into HEAD
|\
| *
cafebabe Fix an off-by-one bug
* |
badf00d Merge 'readme' into HEAD
|\ \
| * |
c0eddad Adds a FAQ section to the README
| * |
d1bad00 Adds an initial README.md file
|/ /
o-'
fa7d00d Start the merging-rebase
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>