{"thread":{"id":"40730","subject":"race condition when pushing","startedAt":"2015-11-05T16:11:13Z","lastAt":"2015-11-18T10:00:42Z","messageCount":4,"participants":["Lyle Ziegelmiller","Eric Sunshine","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"272956","messageId":"SNT153-DS223275FC4D60A266EE7E28F6290@phx.gbl","threadId":"40730","inReplyTo":null,"subject":"race condition when pushing","fromName":"Lyle Ziegelmiller","fromEmail":"lyle_z@hotmail.com","sentAt":"2015-11-05T16:11:13Z","receivedAt":"2015-11-05T16:11:13Z","isPatch":false,"sender":{"key":"lyle_z@hotmail.com","avatar":null},"body":"Hi\n\ngit push --set-upstream  has some sort of race condition. Some times when I \nexecute it, it works. Other times, it does not. Below is from my command \nwindow. I've executed the exact same command (using bash history \nre-execution, so I know I didn't make a typo), repeatedly. Notice the last \nexecution results in an error. I am the only person on my machine. This is \nnon-deterministic behavior.\n\nlylez@LJZ-DELLPC ~/gittest/local\n$ git push --set-upstream origin localbranch1\nBranch localbranch1 set up to track remote branch localbranch1 from origin.\nEverything up-to-date\n\nlylez@LJZ-DELLPC ~/gittest/local\n$ git push --set-upstream origin localbranch1\nBranch localbranch1 set up to track remote branch localbranch1 from origin.\nEverything up-to-date\n\nlylez@LJZ-DELLPC ~/gittest/local\n$ git push --set-upstream origin localbranch1\nerror: could not commit config file .git/config\nBranch localbranch1 set up to track remote branch localbranch1 from origin.\nEverything up-to-date\n\nI'm using Git in a Cygwin window on a 32-bit Windows 10 machine. Others have \nexperienced this as well: \nhttp://stackoverflow.com/questions/18761284/git-error-could-not-commit-config-file\n\nlylez@LJZ-DELLPC ~/gittest/local\n$ git --version\ngit version 2.5.1\n\n\nRegards,\n\nLyle Ziegelmiller\n"},{"id":"272978","messageId":"CAPig+cSGSe=7PY7HVuAdy=4chbkkACiEBZzvDA4AktMKFiRfPw@mail.gmail.com","threadId":"40730","inReplyTo":"SNT153-DS223275FC4D60A266EE7E28F6290@phx.gbl","subject":"Re: race condition when pushing","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-11-05T23:00:33Z","receivedAt":"2015-11-05T23:00:33Z","isPatch":false,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Nov 5, 2015 at 11:11 AM, Lyle Ziegelmiller <lyle_z@hotmail.com> wrote:\n> git push --set-upstream  has some sort of race condition. Some times when I\n> execute it, it works. Other times, it does not. Below is from my command\n> window. I've executed the exact same command (using bash history\n> re-execution, so I know I didn't make a typo), repeatedly. Notice the last\n> execution results in an error. I am the only person on my machine. This is\n> non-deterministic behavior.\n>\n> lylez@LJZ-DELLPC ~/gittest/local\n> $ git push --set-upstream origin localbranch1\n> Branch localbranch1 set up to track remote branch localbranch1 from origin.\n> Everything up-to-date\n>\n> lylez@LJZ-DELLPC ~/gittest/local\n> $ git push --set-upstream origin localbranch1\n> Branch localbranch1 set up to track remote branch localbranch1 from origin.\n> Everything up-to-date\n>\n> lylez@LJZ-DELLPC ~/gittest/local\n> $ git push --set-upstream origin localbranch1\n> error: could not commit config file .git/config\n> Branch localbranch1 set up to track remote branch localbranch1 from origin.\n> Everything up-to-date\n>\n> I'm using Git in a Cygwin window on a 32-bit Windows 10 machine.\n\nIf I recall correctly, the typical culprit is a Windows virus scanner\n(or even an indexer) locking the file, so git is unable to manipulate\nit.\n"},{"id":"273432","messageId":"alpine.DEB.1.00.1511171419130.1686@s15462909.onlinehome-server.info","threadId":"40730","inReplyTo":"CAPig+cSGSe=7PY7HVuAdy=4chbkkACiEBZzvDA4AktMKFiRfPw@mail.gmail.com","subject":"Re: race condition when pushing","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-11-17T13:25:42Z","receivedAt":"2015-11-17T13:25:42Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Lyle & Eric,\n\nOn Thu, 5 Nov 2015, Eric Sunshine wrote:\n\n> On Thu, Nov 5, 2015 at 11:11 AM, Lyle Ziegelmiller <lyle_z@hotmail.com> wrote:\n> > git push --set-upstream  has some sort of race condition. Some times\n> > when I execute it, it works. Other times, it does not. Below is from\n> > my command window. I've executed the exact same command (using bash\n> > history re-execution, so I know I didn't make a typo), repeatedly.\n> > Notice the last execution results in an error. I am the only person on\n> > my machine. This is non-deterministic behavior.\n> >\n> > lylez@LJZ-DELLPC ~/gittest/local\n> > $ git push --set-upstream origin localbranch1\n> > Branch localbranch1 set up to track remote branch localbranch1 from origin.\n> > Everything up-to-date\n> >\n> > lylez@LJZ-DELLPC ~/gittest/local\n> > $ git push --set-upstream origin localbranch1\n> > Branch localbranch1 set up to track remote branch localbranch1 from origin.\n> > Everything up-to-date\n> >\n> > lylez@LJZ-DELLPC ~/gittest/local\n> > $ git push --set-upstream origin localbranch1\n> > error: could not commit config file .git/config\n> > Branch localbranch1 set up to track remote branch localbranch1 from origin.\n> > Everything up-to-date\n> >\n> > I'm using Git in a Cygwin window on a 32-bit Windows 10 machine.\n\nAre you using Cygwin's own Git, or Git for Windows, or something else?\n\n> If I recall correctly, the typical culprit is a Windows virus scanner\n> (or even an indexer) locking the file, so git is unable to manipulate\n> it.\n\nIn Git for Windows, we have code to work around this issue by detecting\nin-use files and waiting for a staggered amount of time to re-try:\n\nhttps://github.com/git-for-windows/git/blob/c6f19b078bf05643c4d50dd520280a80f19f0002/compat/mingw.c#L208-L231\n\nThis is used e.g. by our `rename()` wrapper:\n\nhttps://github.com/git-for-windows/git/blob/c6f19b078bf05643c4d50dd520280a80f19f0002/compat/mingw.c#L1859-L1904\n\nPlease note that this code is active in Git for Windows (i.e. the *MinGW*\nversion of Git) but not in Cygwin Git (nor the MSys2 version of Git).\n\nCiao,\nDscho\n"},{"id":"273469","messageId":"alpine.DEB.1.00.1511181057310.1686@s15462909.onlinehome-server.info","threadId":"40730","inReplyTo":"SNT153-DS16C364D3AE7608DB14B4E3F61D0@phx.gbl","subject":"Re: race condition when pushing","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2015-11-18T10:00:42Z","receivedAt":"2015-11-18T10:00:42Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Lyle,\n\nyour quoting seems a bit funny; I fixed it by indenting *my* words one\nmore level.\n\nOn Tue, 17 Nov 2015, Lyle Ziegelmiller wrote:\n\n> [I, Johannes, wrote:]\n>\n> > Please note that this code is active in Git for Windows (i.e. the\n> > *MinGW* version of Git) but not in Cygwin Git (nor the MSys2 version\n> > of Git).\n> \n> May I suggest including this feature in Cygwin's Git, since it is\n> exclusively used on Windows.\n\nPlease note that it is very easy for you to take up this task: refactor\nthe retry family of functions into their own file inside compat/win32/,\nand a second commit to use them also in Cygwin.\n\n> Thanks for working on Git!! :)\n\nThe best way of thanking is by contributing your own changes ;-)\n\nCiao,\nJohannes\n"}]}