git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC] git-float

From
MTMichael 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" $ref
git-rebase --onto $ref~1 $ref && git-cherry-pick $ref
-- 
MST
Next: Junio C Hamano
Message 1 of 3 in “[RFC] git-float”
  1. Michael S. TsirkinMay 17, 2007
  2. Junio C HamanoMay 18, 2007
  3. Michael S. TsirkinMay 22, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.