git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Git pop/apply/drop with stash message

From
NANg, Alexander <ang@slac.stanford.edu>
Date
Sep 28, 2022, 17:45 UTC
Message-ID
<CH2PR07MB81876BD87634A5C62BF0BC12EC549@CH2PR07MB8187.namprd07.prod.outlook.com>
Hello, I am experiencing the following issue. Thanks for reviewing.
What did you do before the bug happened? (Steps to reproduce your issue)
1. Changes in working directory
2. git stash push -m "test" :to stash changes in stash with message "test"
3. git stash pop stash^{/test}  :pop stash 
 
What did you expect to happen? (Expected behavior)
git pops the stash with message "test", applying stash to files and removing stash from list
 
What happened instead? (Actual behavior)
Returns 'stash^{/test}' is not a stash reference
 
What's different between what you expected and what actually happened?
Git stash pop and git stash drop do not allow for referencing specific stashes by message.
The desired behavior does work for git stash apply stash^{/test}, but I need to also remove stash from list.
 
Anything else you want to add:
 
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.35.4
cpu: x86_64
no commit associated with this build
sizeof-long: 8
sizeof-size_t: 8
shell-path: /bin/sh
uname: Linux 2.6.32-754.43.1.el6.x86_64 #1 SMP Wed Nov 17 07:27:32 EST 2021 x86_64
compiler info: gnuc: 4.4
libc info: glibc: 2.12
$SHELL (typically, interactive shell): /bin/bash
 
 
[Enabled Hooks]
Message 1 of 1 in “Git pop/apply/drop with stash message”
  1. Ng, AlexanderSep 28, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.