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

bug when git stash apply after switching to branch with links were regular files

From
Britton Kerin <britton.kerin@gmail.com>
Date
Jan 5, 2022, 00:52 UTC
Message-ID
<CAC4O8c98H=txccR-3JM2L7jiAaf7WmJ1qyg+oiqSgrB5Qc1nUg@mail.gmail.com>
On git version 2.34.1:

I have a branch where sym links get replaced with copies of the regular files they point to. If I make a change to that branch and git stash it, then git checkout master again, then git stash apply I get messages like this:

     $ git stash apply
     Adding dirA_thats_now_a_link_again
     Adding dirB_thats_now_a_link_again
     etc.

These messages seem completely spurious: applying the stash doesn't result in any actual changes in any of those paths (and the links stay links). The only change is to the actual file affected by the stash (which was a real file in both the branch and master).

Interestingly I was getting this same message a few smallish versions of git back I believe when I did the checkout back to master. I updated to latest stable git and that issue went away. So it looks like maybe a fix to get rid of these spurious messages got applied in one place but not others.

If there's interest in fixing this issue I can go back and isolate it more carefully on request.

Britton
Message 1 of 1 in “bug when git stash apply after switching to branch with links were regular files”
  1. Britton KerinJan 5, 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.