pgit.sh: Pass --autostash to rebase

Calling make git-pull-xxx from a projects directory stops iterating projects if one has a dirty workspace. Calling --autostash fixes that.

With this in place, a failed rebase leaves the local changes behind stashed. So, after manually fixing the rebase, the stash needs to be manually reapplied. The commands that led up to the failure are logged right before, so I have hope that this is learnable, and not too much of a footgun.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-05 08:02:54 +01:00
commit 1e9ab195a6

View file

@ -182,7 +182,7 @@ clone()
run_git -C $p fetch --prune --recurse-submodules=on-demand $remotename $fromref
run_git -C $p submodule foreach --recursive 'git fetch --tags -f origin'
if [ "$toref" ]; then
run_git -C $p rebase $remotename/$fromref $toref
run_git -C $p rebase --autostash $remotename/$fromref $toref
run_git -C $p merge --ff-only $remotename/$fromref $toref
fi
else