Stash changes before git self-update

This commit is contained in:
2024-11-04 09:27:38 -05:00
parent 0a451a1ad1
commit 49ae5879be

View File

@@ -1577,7 +1577,7 @@ update() {
local before_pull_hash after_pull_hash local before_pull_hash after_pull_hash
before_pull_hash=$(git -C "$SCRIPT_DIR" rev-parse HEAD) before_pull_hash=$(git -C "$SCRIPT_DIR" rev-parse HEAD)
# Run a git stash in case there are local changes # Run a git stash in case there are local changes
execute git stash --quiet execute git -C "$SCRIPT_DIR" stash --quiet
if git -C "$SCRIPT_DIR" pull | grep -qv "Already up to date"; then if git -C "$SCRIPT_DIR" pull | grep -qv "Already up to date"; then
return 0 return 0
fi fi