[RFC] git-float
- From
- Michael S. Tsirkin <mst@dev.mellanox.co.il>
- Date
- May 17, 2007, 21:18 UTC
- Message-ID
- <20070517211805.GA29259@mellanox.co.il>
Hi! Here's a simple script I use to float a commit up the history - similiar to what stg float does if I understand it correctly.
Is this a good way to implement it? Would it make sense to have something like this in git tree? Drop me a note.
############################################################
#!/bin/bash
check_revision() {
case $# in
2)
true
;;
*)
echo "Unable to float $1: it does not match a single non-merge commit" >&2
exit 2
;;
esac
}
ref=`git-rev-list --no-merges $1~1..$1`
check_revision "$1" $refgit-rebase --onto $ref~1 $ref && git-cherry-pick $ref
-- MST