From 1e9ab195a611dd4a2253dd0acbfad901ff344719 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 5 Feb 2026 08:02:54 +0100 Subject: [PATCH] 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 --- scripts/pgit.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/pgit.sh b/scripts/pgit.sh index 462bfc48..c999e15d 100644 --- a/scripts/pgit.sh +++ b/scripts/pgit.sh @@ -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