internal/cmd: git_wrapper: add git stash push to wrapped subcommands#160
internal/cmd: git_wrapper: add git stash push to wrapped subcommands#160christoph-heiss wants to merge 2 commits into
git stash push to wrapped subcommands#160Conversation
`git stash push` (optionally) also takes path(s) for its arguments, so translate them. Signed-off-by: Christoph Heiss <christoph@c8h4.io>
|
@mroth Mind taking a look? |
|
@christoph-heiss sorry for the delay, let me take a look. |
Cover both code paths the stash wrapper introduces, across bash/zsh/fish: - `git stash push <n>` expands the numeric arg to the right path - bare `git stash` / `git stash pop` pass through unchanged (no expansion) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Nice, well-scoped change — translating only One non-blocking suggestion: that reasoning is the whole point of the In stash)
# Only `stash push` takes pathspecs; for pop/apply/drop/show a number is a
# stash index, not a file number, so pass those through untranslated.
case ${2-:} in
push)
scmpuff exec --relative -- "$SCMPUFF_GIT_CMD" "$@";;
*)
"$SCMPUFF_GIT_CMD" "$@";;
esac
;;…and the equivalent above the Otherwise this looks good. I pushed a couple of integration tests to the branch to lock in the behavior across bash/zsh/fish — one for (Review drafted by by Claude Opus but manually reviewed by @mroth ) |
Pretty much as it says on the tin.
git stash push(optionally) also takes path(s) for its arguments, so translate them.