about summary refs log tree commit diff stats
path: root/doc/pick.sh
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-02-04 02:45:30 +0100
committerhut <hut@lavabit.com>2010-02-04 02:45:30 +0100
commit8111b8e97219ef289b25a296a2775c8975b01dc9 (patch)
treef201390e11c516258940ca604815c023cd17d890 /doc/pick.sh
parent51e9b18e6d16c1ddd686f54e0779420722a7ffb3 (diff)
downloadranger-8111b8e97219ef289b25a296a2775c8975b01dc9.tar.gz
added doc/pick.sh
Diffstat (limited to 'doc/pick.sh')
-rwxr-xr-xdoc/pick.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/pick.sh b/doc/pick.sh
new file mode 100755
index 00000000..fb9da83b
--- /dev/null
+++ b/doc/pick.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+# I work on a branch (named hut) which contains commits
+# that should not be part of the standard distribution.
+#
+# This script picks all the good commits from hut and
+# adds them to the master branch.
+# Bad commits are marked with a "custom:" at the beginning
+# of the commit message.
+
+BRANCH=`git branch 2>/dev/null|grep -e ^* | tr -d \*\ `
+
+git checkout master
+
+while read -r hash tag rest; do
+	if [ $tag != 'custom:' ]; then
+		git cherry-pick $hash || exit 1
+	fi
+done < <(git log --oneline --no-color master..hut)
+
+git checkout hut
+git rebase master
+
+git checkout $BRANCH