Commit 02aab09c authored by bbguimaraes's avatar bbguimaraes
Browse files

scripts/git: only rebase if necessary

parent 38705ba0
......@@ -139,14 +139,13 @@ rebase() {
rebase_branches() {
local x
git switch master
local base x n=0
base=$(git rev-parse HEAD)
[[ "$#" -eq 0 ]] && set -- $(git branch --no-merged)
git rebase master "$1"
for x; do
sleep 1 # for unique timestamps
git rebase master "$x"
git merge-base --is-ancestor "$base" "$x" && continue
sleep "$n"; n=1 # for unique timestamps
git rebase "$base" "$x"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment