fixes the stash deleting error and stash id on modal - #10
Merged
Conversation
gitgusilva
added a commit
that referenced
this pull request
Aug 11, 2026
The resolve added in #10 looked the entry up by its OID and then built the ref out of that same OID: `stash@{<oid>}`. Git reads whatever is inside the braces as a date when it is not a number, warns that the reflog does not go back that far, prints "Dropped stash@{<oid>}" and removes nothing — so the delete stopped erroring and started lying instead. It is `entry.index`, the position the list already carries.
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.
What this changes
It fixes stash drop failing when the UI passes a commit OID, and the drop confirmation modal showing a literal stash@{index} instead of the real stash number.
Why
Dropping a stash ran git stash drop . Git only accepts stash@{n}, so the command failed with '…' is not a stash reference.
The confirm string used stash@{index} / stash@{{index}}. In vue-i18n, @{…} is linked-message syntax, so the index was never interpolated.
Closes #9
How it was tested
Linux: open Stashes, right-click a stash → Delete, confirm the modal shows stash@{0} (or the correct index), and the stash is removed without the “not a stash reference” error.
Checklist
npm --prefix app/ui run build passes (this runs vue-tsc, so it catches type errors too)
Ran the change in the app, not only in tests
New user-facing strings are in all three locales: en.json, pt-br.json, es.json
Colours, borders and surfaces come from the theme tokens (bg-surface, border-line, text-content), not from hardcoded Tailwind palette classes, so every theme keeps working
Hints use the Tooltip component rather than a title attribute
Commits follow the conventional style used in the history (feat(scope): ..., fix(scope): ...)
No emojis in code, documentation or commit messages