{"thread":{"id":"56767","subject":"Bug report: branch display in git stash output","startedAt":"2021-10-23T07:22:14Z","lastAt":"2021-10-23T12:10:47Z","messageCount":2,"participants":["Kraymer","Bagas Sanjaya"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"439442","messageId":"CAAjS6zO2E043KEcqEJr_5QbtdZEjxVWObCc518Ti3sW-p6LX5A@mail.gmail.com","threadId":"56767","inReplyTo":null,"subject":"Bug report: branch display in git stash output","fromName":"Kraymer","fromEmail":"kraymer@gmail.com","sentAt":"2021-10-23T07:21:44Z","receivedAt":"2021-10-23T07:22:14Z","isPatch":false,"sender":{"key":"kraymer@gmail.com","avatar":null},"body":"Thank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n\n❯ git checkout -b branch/with/slash\nSwitched to a new branch 'branch/with/slash'\n❯ echo \"foobar\" > foobar.txt\n❯ git stash\nSaved working directory and index state WIP on slash: 41dc5da git:\nupdate .gitconfig\n\nWhat did you expect to happen? (Expected behavior)\n\n❯ git stash list\nstash@{0}: WIP on branch/with/slash: 41dc5da git: update .gitconfig\n\nWhat happened instead? (Actual behavior)\n\n❯ git stash list\nstash@{0}: WIP on slash: 41dc5da git: update .gitconfig\n\nWhat's different between what you expected and what actually happened?\n\nthe displayed branch name in `git stash` output is truncated\n\n\n[System Info]\ngit version:\ngit version 2.33.1\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 5.11.0-38-generic #42~20.04.1-Ubuntu SMP Tue Sep 28\n20:41:07 UTC 2021 x86_64\ncompiler info: gnuc: 9.3\nlibc info: glibc: 2.31\n$SHELL (typically, interactive shell): /usr/bin/zsh\n\n\n[Enabled Hooks]\n\n-- \nFabrice\n"},{"id":"439447","messageId":"376fa19b-0e3f-1ccb-6c25-c9aa86fc0707@gmail.com","threadId":"56767","inReplyTo":"CAAjS6zO2E043KEcqEJr_5QbtdZEjxVWObCc518Ti3sW-p6LX5A@mail.gmail.com","subject":"Re: Bug report: branch display in git stash output","fromName":"Bagas Sanjaya","fromEmail":"bagasdotme@gmail.com","sentAt":"2021-10-23T12:10:39Z","receivedAt":"2021-10-23T12:10:47Z","isPatch":false,"sender":{"key":"bagasdotme@gmail.com","avatar":"https://avatars.githubusercontent.com/u/40219486?v=4"},"body":"On 23/10/21 14.21, Kraymer wrote:\n> What did you do before the bug happened? (Steps to reproduce your issue)\n> \n> ❯ git checkout -b branch/with/slash\n> Switched to a new branch 'branch/with/slash'\n> ❯ echo \"foobar\" > foobar.txt\n> ❯ git stash\n> Saved working directory and index state WIP on slash: 41dc5da git:\n> update .gitconfig\n> \n> What did you expect to happen? (Expected behavior)\n> \n> ❯ git stash list\n> stash@{0}: WIP on branch/with/slash: 41dc5da git: update .gitconfig\n> \n> What happened instead? (Actual behavior)\n> \n> ❯ git stash list\n> stash@{0}: WIP on slash: 41dc5da git: update .gitconfig\n> \n> What's different between what you expected and what actually happened?\n> \n> the displayed branch name in `git stash` output is truncated\n\nI can reproduce the issue using this reproducer:\n\n```\n\nmkdir test && cd test &&\ngit init &&\n\n# make initial commit first, since git stash requires it\necho \"./\" > slashdot &&\ngit commit -m \"slashdot\" &&\n\n# stash WIP\ngit checkout -b slash/dot &&\necho \"slashdot\" >> slashdot &&\ngit stash push -m \"slashdot\"\n```\n\nNote that when stashing, the message says \"Saved working directory and \nindex state On dot: slashdot\" although we are currently on `slash/dot` \nbranch.\n\n-- \nAn old man doll... just what I always wanted! - Clara\n"}]}