git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFC] git-float
@ 2007-05-17 21:18 Michael S. Tsirkin
  2007-05-18  0:31 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Michael S. Tsirkin @ 2007-05-17 21:18 UTC (permalink / raw)
  To: git, Junio C Hamano

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" $ref

git-rebase --onto $ref~1 $ref && git-cherry-pick $ref

-- 
MST

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-05-22 12:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-17 21:18 [RFC] git-float Michael S. Tsirkin
2007-05-18  0:31 ` Junio C Hamano
2007-05-22 12:58   ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).