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

Fwd: Bug report (symlink, git stash)

From
DBDávid Bíró <dbiro97@gmail.com>
Date
Sep 6, 2022, 20:25 UTC
Message-ID
<CAOCSQxSj_Bmn_9n+Vca_Q3L8hd4WUG6Lp7gneEFWKzHbJ27psQ@mail.gmail.com>
In-Reply-To
<CAOCSQxRJ_sPmL8d6FSYyEt0FytCLatxvrOYKCRV68gDVhzQNbA@mail.gmail.com>
Hi devs,
I found a bug (easy to reproduce):

What did you do before the bug happened? (Steps to reproduce your issue) ```bash mkdir back mkdir shared touch shared/foo ln -s shared/ back/shared git init git add . git commit -m 'Initial commit' unlink back/shared mv shared/ back/shared git stash git stash apply ```

What did you expect to happen? (Expected behavior) I expected to get back the same file structure as before git stash

What happened instead? (Actual behavior) The shared folder was removed

What's different between what you expected and what actually happened? I expected the back/shared folder to be a folder, but instead it was a symlink which was marked for removal.

Anything else you want to add: Nope.

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.37.2 cpu: x86_64 no commit associated with this build sizeof-long: 8 sizeof-size_t: 8 shell-path: /bin/sh uname: Linux 5.19.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Wed, 17 Aug 2022 13:48:51 +0000 x86_64 compiler info: gnuc: 12.1 libc info: glibc: 2.36 $SHELL (typically, interactive shell): /usr/bin/fish

[Enabled Hooks]

Thanks, David Biro

Message 1 of 1 in “Fwd: Bug report (symlink, git stash)”
  1. Dávid BíróSep 6, 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.