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

Git stash: create stash even if he end up with an Error (lock file)

From
TLThomas-Louis Laforest <tllaforest@arbault.ca>
Date
Apr 4, 2014, 15:11 UTC
Message-ID
<4a6120a3c62d420c951aab89ba3730fb@CO1PR02MB029.namprd02.prod.outlook.com>
Good day,
I'm not sure if it a real bug or just a functionality fix but this is my issue.

What I wanted to do : Stash non committed change, but forgot to close a file that had uncommitted change and was write lock.

What I did : Git stash

What happen Git stash created the stash and try to remove the uncommitted change but fail on the lock file, leaving the work directory with a stash than can't be pop without manually resetting the lock file.

What I expected to see : Git stash fail and revert to the work directory before the command.

How the last two are different: End user get error, close the application and restart Vs End user get error, close the application, reset the work directory, fear he may have lost the change he was doing, pop the stash, revise everything is good, than restart doing whatever git task he was trying to do.

Thank you

Thomas-Louis Laforest, ing. jr, Jr. Eng. Chargé de projet, Project Leader solutions intégrées  |  integrated solutions

T 819 542-5600  x3106 F 819 845-5600 tllaforest@arbault.ca The information contained herein is of private and confidential nature. It can be used only by the above-mentioned recipients. Any other person who would take note of it is advised that it is strictly forbidden for him to reveal the information, to distribute it or to copy it. If this communication were transmitted to you by mistake, warn us immediately by telephone or email, and erase the original, without taking a copy, revealing the content nor taking some measures based on it. Les renseignements contenus dans les présentes sont de nature privée et confidentielle. Ils ne peuvent être utilisés que par le ou les destinataires susmentionnés. Toute autre personne qui en prendrait connaissance est priée de noter qu'il lui est strictement interdit de les divulguer, de les distribuer ou de les copier. Si cette communication vous a été transmise par mégarde, veuillez nous en aviser immédiatement par téléphone ou par courriel, et effacer l'original, sans en tirer de copie, en dévoiler le contenu ni prendre quelque mesure fondée sur celui-ci.

Message 1 of 1 in “Git stash: create stash even if he end up with an Error (lock file)”
  1. Thomas-Louis LaforestApr 4, 2014

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.