Re: Bug: "git stash create" ignores "message" argument
- From
- Darren Rambaud <d.gitscm@ryz.dev>
- Date
- Jul 6, 2025, 03:36 UTC
- Message-ID
- <f9a6c8a1-bdbe-4892-bb71-39a6307a5452@ryz.dev>
- In-Reply-To
- <CAKMuBmSeFh63212_GhBHfOTbW5VaqvQjo7jz4aowm8bntCXkVw@mail.gmail.com>
You won't see the custom message in `git stash list`, you will see it in `git log` while in detached HEAD state.
$ git stash create "changes to readme" 0a28354847baf90f2c7377a262f35e62c461a95e $ git stash store 0a28354847baf90f2c7377a262f35e62c461a95e $ git checkout 0a28354847baf90f2c7377a262f35e62c461a95e $ git log commit 0a28354847baf90f2c7377a262f35e62c461a95e (HEAD) Merge: 323920c 46c4b6a Author: git stash <git@stash> Date: Sat Jul 5 22:18:58 2025 -0500
On main: changes to readme
commit 46c4b6a5d22df525da70c1bbfc6d3a36c4ba25e3 Author: git stash <git@stash> Date: Sat Jul 5 22:18:58 2025 -0500
index on main: 323920c docs: add readme ...
Darren
On 2025-07-05 20:28, José Miguel Armijo Fidalgo wrote:
Show 43 quoted lines
> What did you do before the bug happened? (Steps to reproduce your issue)
> $ git stash create "example message"
> 1e9b483d1f9477de5c99a708f4aa512ba
> $ git stash store 1e9b483d1f9477de5c99a708f4aa512ba
> $ git stash list
>
> What did you expect to happen? (Expected behavior)
> stash@{0}: example message
>
> What happened instead? (Actual behavior)
> stash@{0}: Created via "git stash store".
>
> What's different between what you expected and what actually happened?
> The documentation does not explain what the message "argument" is used for.
> I would have expected that the message would be used by the store command.
>
> Anything else you want to add:
> If the message argument is not used at all, I would expect to
> remove the argument, or
> alternatively, that the documentation explains why the argument
> exists and what it does/doesn't do.
>
> Please review the rest of the bug report below.
> You can delete any lines you don't wish to share.
>
> [System Info]
> git version:
> git version 2.50.0
> cpu: arm64
> no commit associated with this build
> sizeof-long: 8
> sizeof-size_t: 8
> shell-path: /bin/sh
> feature: fsmonitor--daemon
> libcurl: 8.7.1
> zlib: 1.2.12
> SHA-1: SHA1_DC
> SHA-256: SHA256_BLK
> uname: Darwin 24.5.0 Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:33
> PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T8122 arm64
> compiler info: clang: 17.0.0 (clang-1700.0.13.3)
> libc info: no libc information available
> $SHELL (typically, interactive shell): /bin/zsh