Add autostash handling to update-dotfiles#477
Open
shunk031 wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #477 +/- ##
==========================================
+ Coverage 90.19% 91.18% +0.98%
==========================================
Files 10 10
Lines 306 329 +23
==========================================
+ Hits 276 300 +24
+ Misses 30 29 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
git stash pop --indeximmediately after the update attempt so local work is not left hidden by default.update-dotfilesbats tests.Autostash Risk Notes
git stash pop --indexcan conflict after the source repository fast-forwards. When that happens, Git keeps the stash entry; the command now reports the restore failure and tells the operator to inspect the remaining stash.Validation
bash -n home/dot_local/bin/exact_common/executable_update-dotfilesshfmt -i 4 -sr -d home/dot_local/bin/exact_common/executable_update-dotfiles tests/install/common/update_dotfiles.batsshellcheck home/dot_local/bin/exact_common/executable_update-dotfilesNote: I did not run bats locally per the repository test policy; GitHub Actions should validate the bats suite.