Previously, `omarchy-update` used the timestamp of the most recent git
commit to determine which migrations are "new" and should be executed.
Unfortunately, that strategy can (and did) fail in certain scenarios. If
a migration was generated at time T1 but not merged until time T3, and
meanwhile omarchy's `master` branch was updated to a new release with
commit timestamp T2 (where T1 < T2 < T3), then anyone who runs
`omarchy-update` between T2 and T3 would end up with `last_updated_at`
equal to T2; thus, on their next `omarchy-update` it would fail to
detect the migration with timestamp T1 as a "new" migration that should
be executed.
This commit changes the strategy for detecting "new" migrations to avoid
that problem. Rather than recording the most recent commit's timestamp,
we record its SHA. Then, after pulling the new changes, we can leverage
`git diff --name-only --diff-filter=A $SHA.. migrations/*.sh`
to return precisely the list of migration files that were introduced by
our `git pull`. It doesn't matter if any of those migrations have a
timestamp that was earlier than the timestamp of the commit we started
on - we will always execute *every* migration that didn't exist before
our `git pull`!
* Change launcher from wofi -> walker
* Add migration
* More wofi -> walker locations
* Add rose pine theme
* Rename refresh script
* Minor improvements to walker + add uwsm
* Back out running as service
* Make these executable
* Add plugins dir for now to resolve open issue 355 from v0.13.0 release
* Replace pavucontrol with wiremix (#225)
Add to install
* Revert "Replace pavucontrol with wiremix (#225)"
This reverts commit 620b397859.
* Fix reference
* Add libqalculate so calc works out of the box
* Actually add libqalculate
* Re-add media
* Add catppuccin-latte
* Final cleanup
* Remove partially baked theme
* Remove failing migration
* Remove failing migration
* Fix refresh script
* Simplify css setup
* Rearrange walker theme files
* Change theme name
* Remove unnecessary file
* Clear everything
* Only worry about the config file now
* Disable load in animation for walker
* Run walker as service
* Make sure we have fresh package db
* Add keybindings theme
* Remove history
* Explain section
* Assume wofi is gone, only run if walker isn't there
* Move as the latest
---------
Co-authored-by: David Heinemeier Hansson <david@hey.com>
Co-authored-by: Roeland <roel4d@webding.org>
If the worktree has conflicts after applying the user's changes from the
autostash, we should reset them before proceeding to ensure we are in
a working state. When there are conflicts, git still keeps the stash
entry, so the user will still be able to manually re-pop the stash and
resolve the conflicts after `omarchy-update` has finished.
In the case of conflicts, the output will look something like this (I've
omitted most of the normal `git pull` output, hence the `[...]`):
```
Updating 729cd6a..45b5d3e
Created autostash: 91853c4
Fast-forward
bin/omarchy | 10 +++++++---
[...]
create mode 100644 themes/tokyo-night/backgrounds/2--Milad-Fakurian-Abstract-Purple-Blue.jpg
Applying autostash resulted in conflicts.
Your changes are safe in the stash.
You can run "git stash pop" or "git stash drop" at any time.
bin/omarchy:65: leftover conflict marker
```
before proceeding with the rest of the `omarchy-update` script from a
clean state. So the user will see 1) that there were conflicts when
applying the autostashed changes, 2) that their changes are still safe
in the stash, and 3) which files (and lines) had conflict markers.