aboutsummaryrefslogtreecommitdiff
path: root/scripts/filter.sh
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2014-02-27 19:39:44 +0000
committerWarner Losh <imp@FreeBSD.org>2014-02-27 19:39:44 +0000
commit0d4a4b13019e01c1eab30b74c983040450010b81 (patch)
treeff6e99cffa59c3e85a311d8dd06e6f6dab4988b2 /scripts/filter.sh
downloadsrc-0d4a4b13019e01c1eab30b74c983040450010b81.tar.gz
src-0d4a4b13019e01c1eab30b74c983040450010b81.zip
Bring in Ian Campbell's pruned dts repo.vendor/device-tree/ianc-efa963ec
From git://xenbits.xen.org/people/ianc/device-tree-rebasing.git commit efa963ec806366c9628dfd1269316bb93b7ecb15 Merge: a72ba09 459c249 Author: Ian Campbell <ian.campbell@citrix.com> Date: Wed Feb 26 08:39:16 2014 +0000 Merge tag 'v3.14-rc4-dts' Linux 3.14-rc4
Notes
Notes: svn path=/vendor/device-tree/; revision=262569 svn path=/vendor/device-tree/ianc-efa963ec/; revision=262576; tag=vendor/device-tree/ianc-efa963ec
Diffstat (limited to 'scripts/filter.sh')
-rwxr-xr-xscripts/filter.sh37
1 files changed, 37 insertions, 0 deletions
diff --git a/scripts/filter.sh b/scripts/filter.sh
new file mode 100755
index 000000000000..61ecb36fee97
--- /dev/null
+++ b/scripts/filter.sh
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# git branch -D upstream/rewritten-prev upstream/master upstream/rewritten filter-state
+
+set -e
+
+export SCRIPTS=$(dirname $(readlink -f $0))
+
+UPSTREAM_MASTER=upstream/master
+UPSTREAM_REWRITTEN=upstream/dts
+
+LAST=$(git show-ref -s refs/heads/$UPSTREAM_MASTER||true)
+if [ -n "$LAST" ] ; then
+ RANGE="$LAST..$UPSTREAM_REWRITTEN"
+else
+ # This must be a new conversion...
+ RANGE="$UPSTREAM_REWRITTEN"
+fi
+
+FETCH_HEAD=$(git rev-parse FETCH_HEAD)
+if [ "$LAST" = "$FETCH_HEAD" ] ; then
+ echo "Nothing new in FETCH_HEAD: $FETCH_HEAD"
+ exit 0
+fi
+
+rm -f .git/refs/original/refs/heads/${UPSTREAM_REWRITTEN}
+
+git branch -f $UPSTREAM_REWRITTEN FETCH_HEAD
+
+sh $SCRIPTS/git-filter-branch --force \
+ --index-filter ${SCRIPTS}/index-filter.sh \
+ --msg-filter 'cat && /bin/echo -e "\n[ upstream commit: $GIT_COMMIT ]"' \
+ --tag-name-filter 'while read t ; do /bin/echo -n $t-dts ; done' \
+ --prune-empty --state-branch refs/heads/filter-state \
+ -- $RANGE
+
+git branch -f $UPSTREAM_MASTER FETCH_HEAD