aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeongJae Park <sj@kernel.org>2023-12-22 13:11:04 -0800
committerSeongJae Park <sj@kernel.org>2023-12-22 13:11:04 -0800
commitb4bdfec59d89a13b43b1c698f7334ca2caa08051 (patch)
tree18c272c6dd065e2ba5bd2f1f7e161bea1ac9e26a
parentfa7b344db6303fa351cc65cefcc83ac393ec6c73 (diff)
downloaddamon-hack-b4bdfec59d89a13b43b1c698f7334ca2caa08051.tar.gz
rebase_damon_next_on_mm_unstable: Find old mm-unstable based on commit subject
Signed-off-by: SeongJae Park <sj@kernel.org>
-rwxr-xr-xrebase_damon_next_on_mm_unstable.sh16
1 files changed, 12 insertions, 4 deletions
diff --git a/rebase_damon_next_on_mm_unstable.sh b/rebase_damon_next_on_mm_unstable.sh
index 4b60378..82c52d0 100755
--- a/rebase_damon_next_on_mm_unstable.sh
+++ b/rebase_damon_next_on_mm_unstable.sh
@@ -12,14 +12,22 @@ if [ $# -eq 1 ]
then
old_mm_unstable=$1
else
- guess=$(git rev-parse akpm.korg.mm/mm-unstable)
- if git log damon/next --pretty=%H | grep "$guess" --max-count 1
+ for commit in $(git log -n 300 --pretty=%h)
+ do
+ if [ "$(git log -1 "$commit" --pretty=%s)" = \
+ "=== mark start of DAMON hack tree ===" ]
+ then
+ old_mm_unstable="$(git rev-parse commit^)"
+ break
+ fi
+ done
+
+ if [ "$old_mm_unstable" = "" ]
then
- old_mm_unstable=$guess
- else
echo "Can't find the old mm-unstable. Pass it explicitly"
exit 1
fi
+ echo "old mm-unstable found as $old_mm_unstable"
fi
new_mm_unstable=akpm.korg.mm/mm-unstable