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

Possible bug: Changing branch with file locked

From
ATAntti Tanskanen <antanskan@gmail.com>
Date
Jul 9, 2020, 11:01 UTC
Message-ID
<CADGzKpxJ7_5htGVgHfvU-caPTm2tLxmCvuc-RoYkxaS=cPY1FA@mail.gmail.com>

Hi, I want to inform you about the fact when I changed a branch with VS Code open and git did not have permissions to address some files in the other branch (or in current branch). I got an error message. That is OK, but my current branch got also polluted with files (from the other branch?). I needed to run “git stash -u” to get rid of those.

I guess this can be reproduced if one locks a file which is in a branch and changes the branch. Better functionality would be that git would only show the error message, not to pollute the branch with files.

Yours, Antti Tanskanen

Message 1 of 1 in “Possible bug: Changing branch with file locked”
  1. Antti TanskanenJul 9, 2020

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.