From cc0ac314ef5a9dc25d6abd764c331b9161b3d1d4 Mon Sep 17 00:00:00 2001 From: Richard Macklin Date: Thu, 17 Jul 2025 19:13:35 -0700 Subject: [PATCH] Use `git pull --autostash` in `omarchy-update` This is a minor follow-up to dcc40719793d52d43698108a0b0784c2f3b48655 to leverage the `--autostash` flag of `git pull` which does the same thing we were doing in three separate commands. This also avoids the possibility of popping something from the stash that `omarchy-update` didn't actually stash. In other words, if the initial `git stash` was a no-op (because there were no changes in the working tree), it's actually not desirable for `omarchy-update` to `git stash pop` at the end, since that potentially pops something the user had manually stashed (we only want `omarchy-update` to pop its own stash entry). Using `--autostash` handles this correctly. Ref: https://git-scm.com/docs/git-pull#Documentation/git-pull.txt---autostash --- bin/omarchy-update | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/omarchy-update b/bin/omarchy-update index 5b2e2d2..6a71409 100755 --- a/bin/omarchy-update +++ b/bin/omarchy-update @@ -11,9 +11,7 @@ else fi # Get the latest while trying to preserve any modifications -git stash -git pull -git stash pop +git pull --autostash # Run any pending migrations for file in migrations/*.sh; do