The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/contrib/device-tree/scripts/filter.sh

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 #!/bin/sh
    2 
    3 # git branch -D upstream/rewritten-prev upstream/master upstream/rewritten filter-state      
    4 
    5 set -e
    6 
    7 export SCRIPTS=$(dirname $(readlink -f $0))
    8 
    9 export FILTER_BRANCH_SQUELCH_WARNING=1
   10 
   11 UPSTREAM_MASTER=upstream/master
   12 UPSTREAM_REWRITTEN=upstream/dts
   13 
   14 LAST=$(git show-ref -s refs/heads/$UPSTREAM_MASTER||true)
   15 if [ -n "$LAST" ] ; then
   16     RANGE="$LAST..$UPSTREAM_REWRITTEN"
   17 else
   18     # This must be a new conversion...
   19     RANGE="$UPSTREAM_REWRITTEN"
   20 fi
   21 
   22 FETCH_HEAD=$(git rev-parse FETCH_HEAD)
   23 if [ "$LAST" = "$FETCH_HEAD" ] ; then
   24         echo "Nothing new in FETCH_HEAD: $FETCH_HEAD"
   25         exit 0
   26 fi
   27 
   28 rm -f .git/refs/original/refs/heads/${UPSTREAM_REWRITTEN}
   29 
   30 git branch -f $UPSTREAM_REWRITTEN FETCH_HEAD
   31 
   32 git filter-branch --force \
   33         --index-filter ${SCRIPTS}/index-filter.sh \
   34         --msg-filter 'cat && /bin/echo -e "\n[ upstream commit: $GIT_COMMIT ]"' \
   35         --tag-name-filter 'while read t ; do /bin/echo -n $t-dts-raw ; done' \
   36         --parent-filter 'sed "s/-p //g" | xargs -r git show-branch --independent | sed "s/\</-p /g"' \
   37         --prune-empty --state-branch refs/heads/filter-state \
   38         -- $RANGE
   39 
   40 git branch -f $UPSTREAM_MASTER FETCH_HEAD

Cache object: a5ed9f167df3ff430d9b477f9d703488


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.