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

Re: Bug report: branch display in git stash output

From
Bagas Sanjaya <bagasdotme@gmail.com>
Date
Oct 23, 2021, 12:10 UTC
Message-ID
<376fa19b-0e3f-1ccb-6c25-c9aa86fc0707@gmail.com>
In-Reply-To
<CAAjS6zO2E043KEcqEJr_5QbtdZEjxVWObCc518Ti3sW-p6LX5A@mail.gmail.com>
On 23/10/21 14.21, Kraymer wrote:
Show 22 quoted lines
> What did you do before the bug happened? (Steps to reproduce your issue)
> 
> ❯ git checkout -b branch/with/slash
> Switched to a new branch 'branch/with/slash'
> ❯ echo "foobar" > foobar.txt
> ❯ git stash
> Saved working directory and index state WIP on slash: 41dc5da git:
> update .gitconfig
> 
> What did you expect to happen? (Expected behavior)
> 
> ❯ git stash list
> stash@{0}: WIP on branch/with/slash: 41dc5da git: update .gitconfig
> 
> What happened instead? (Actual behavior)
> 
> ❯ git stash list
> stash@{0}: WIP on slash: 41dc5da git: update .gitconfig
> 
> What's different between what you expected and what actually happened?
> 
> the displayed branch name in `git stash` output is truncated
I can reproduce the issue using this reproducer:
```

mkdir test && cd test && git init &&

# make initial commit first, since git stash requires it echo "./" > slashdot && git commit -m "slashdot" &&

# stash WIP git checkout -b slash/dot && echo "slashdot" >> slashdot && git stash push -m "slashdot" ```

Note that when stashing, the message says "Saved working directory and index state On dot: slashdot" although we are currently on `slash/dot` branch.

-- 
An old man doll... just what I always wanted! - Clara
Previous: Kraymer
Message 2 of 2 in “Bug report: branch display in git stash output”
  1. KraymerOct 23, 2021
  2. Bagas SanjayaOct 23, 2021

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.