fix(install): use stash@{0} instead of git rev-parse refs/stash for autostash recovery
Autostash creates refs/stash as a pointer to the latest stash commit, but
git stash apply/drop expect the symbolic ref format like stash@{0}, not
the raw commit SHA. Using the commit SHA causes: error: 'X is not a stash reference'
This commit is contained in:
@@ -890,7 +890,7 @@ clone_repo() {
|
|||||||
stash_name="hermes-install-autostash-$(date -u +%Y%m%d-%H%M%S)"
|
stash_name="hermes-install-autostash-$(date -u +%Y%m%d-%H%M%S)"
|
||||||
log_info "Local changes detected, stashing before update..."
|
log_info "Local changes detected, stashing before update..."
|
||||||
git stash push --include-untracked -m "$stash_name"
|
git stash push --include-untracked -m "$stash_name"
|
||||||
autostash_ref="$(git rev-parse --verify refs/stash)"
|
autostash_ref="stash@{0}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
git fetch origin
|
git fetch origin
|
||||||
|
|||||||
Reference in New Issue
Block a user