diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-12-06 19:47:18 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-12-07 09:23:24 -0800 |
commit | 980b21149775e094de73d0e776c689abcfa3c99e (patch) | |
tree | 6b17e317fecc4aabd71766c25e1c83074f6aa9a4 | |
parent | 32d2fedfad1b1fe5133dbea05580aabc47b4cfb9 (diff) | |
download | ltsi-kernel-980b21149775e094de73d0e776c689abcfa3c99e.tar.gz |
generate_git: fix up autoresume feature
The autoresume feature allows you to restart from wherever
your current tree buildup last stopped (i.e. a git am fail
that you have since fixed, etc.) It does this by looking
for a unique upstream commit ID if there is one in the
current top commit. If not, then it falls back to rummaging
around in the patches for something with a matching diffstat
to the top commit.
This was code I borrowed from another script I wrote, in
which all the patches were peers to the series file, i.e.
no subdirs of patches. But the LTSI has subdirs. So
teach autoresume where to find the patches.
An example usage:
ltsi-test$git reset --hard HEAD~4
HEAD is now at 4eddc87 codel: use u16 field instead of 31bits for rec_inv_sqrt
ltsi-test$~/git/ltsi-kernel/scripts/generate_git -a
resuming from current "patches.codel/codel-use-u16-field-instead-of-31bits-for-rec_inv_sq.patch"
(671/674) Applying: net/codel: Add missing #include <linux/prefetch.h>
(672/674) Applying: net: codel: fix build errors
(673/674) Applying: fq_codel: should use qdisc backlog as threshold
(674/674) Applying: codel: refine one condition to avoid a nul rec_inv_sqrt
ltsi-test$
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rwxr-xr-x | scripts/generate_git | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/generate_git b/scripts/generate_git index cb1053d2ef8812..9cdaf37412aff3 100755 --- a/scripts/generate_git +++ b/scripts/generate_git @@ -60,7 +60,7 @@ if [ -n "$AUTORESUME" ]; then DS1=`mktemp` DS2=`mktemp` git show | diffstat -p0 > $DS1 - for i in $DIR/*\.patch ; do + for i in $DIR/patches\.*/*\.patch ; do cat $i | diffstat -p0 > $DS2 cmp -s $DS1 $DS2 if [ $? = 0 ]; then @@ -85,7 +85,7 @@ if [ -n "$AUTORESUME" ]; then exit 1 fi - START=`basename $START` + START=`echo $START|sed 's/^.*patches\./patches./'` echo resuming from current \"$START\" fi |