From c0f0eb815ea37594c9bcd0630c88adbd94184722 Mon Sep 17 00:00:00 2001 From: Stephen Rothwell Date: Mon, 25 Nov 2013 10:24:18 +1100 Subject: [PATCH] import_akpm: cope if there is no linus patch --- import-akpm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/import-akpm b/import-akpm index 83bc7e8..7f2c0cf 100755 --- a/import-akpm +++ b/import-akpm @@ -18,7 +18,10 @@ mmotm="../../mmotm/text" sfile="$mmotm/series" cpwd=$(pwd) -base=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/origin.patch") +[ -f "$mmotm/broken-out/origin.patch" ] && + base=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/origin.patch") +[ "$base" ] || + base=$(git describe --abbrev=0 origin/master) nbase=$(sed -n '1s/^GIT *\([^ ]*\).*$/\1/p' "$mmotm/broken-out/linux-next.patch") git rev-parse --verify "$base" >/dev/null || { log "Unknown origin BASE $base" -- 2.39.2