mirror of
https://github.com/git/git.git
synced 2026-01-14 12:48:15 +00:00
33 lines
501 B
Bash
Executable File
33 lines
501 B
Bash
Executable File
#!/bin/sh
|
|
|
|
m=$(git-rev-parse "master^0")
|
|
for branch
|
|
do
|
|
b=$(git-rev-parse "$branch^0")
|
|
case "$(git-merge-base --all "$b" "$m")" in
|
|
"$m")
|
|
echo >&2 "$branch: up to date"
|
|
continue
|
|
;;
|
|
esac
|
|
git-show-branch "$branch" master
|
|
while :
|
|
do
|
|
echo -n >&2 "Rebase $branch [Y/n]? "
|
|
read ans
|
|
case "$ans" in
|
|
[Yy]*)
|
|
git rebase master "$branch" || exit
|
|
break
|
|
;;
|
|
[Nn]*)
|
|
echo >&2 "Not rebasing $branch"
|
|
break
|
|
;;
|
|
*)
|
|
echo >&2 "Sorry, I could not hear you"
|
|
;;
|
|
esac
|
|
done
|
|
done
|