* race condition when pushing
@ 2015-11-05 16:11 Lyle Ziegelmiller
2015-11-05 23:00 ` Eric Sunshine
0 siblings, 1 reply; 4+ messages in thread
From: Lyle Ziegelmiller @ 2015-11-05 16:11 UTC (permalink / raw)
To: git bug report
Hi
git push --set-upstream has some sort of race condition. Some times when I
execute it, it works. Other times, it does not. Below is from my command
window. I've executed the exact same command (using bash history
re-execution, so I know I didn't make a typo), repeatedly. Notice the last
execution results in an error. I am the only person on my machine. This is
non-deterministic behavior.
lylez@LJZ-DELLPC ~/gittest/local
$ git push --set-upstream origin localbranch1
Branch localbranch1 set up to track remote branch localbranch1 from origin.
Everything up-to-date
lylez@LJZ-DELLPC ~/gittest/local
$ git push --set-upstream origin localbranch1
Branch localbranch1 set up to track remote branch localbranch1 from origin.
Everything up-to-date
lylez@LJZ-DELLPC ~/gittest/local
$ git push --set-upstream origin localbranch1
error: could not commit config file .git/config
Branch localbranch1 set up to track remote branch localbranch1 from origin.
Everything up-to-date
I'm using Git in a Cygwin window on a 32-bit Windows 10 machine. Others have
experienced this as well:
http://stackoverflow.com/questions/18761284/git-error-could-not-commit-config-file
lylez@LJZ-DELLPC ~/gittest/local
$ git --version
git version 2.5.1
Regards,
Lyle Ziegelmiller
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: race condition when pushing
2015-11-05 16:11 race condition when pushing Lyle Ziegelmiller
@ 2015-11-05 23:00 ` Eric Sunshine
2015-11-17 13:25 ` Johannes Schindelin
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sunshine @ 2015-11-05 23:00 UTC (permalink / raw)
To: Lyle Ziegelmiller; +Cc: git bug report
On Thu, Nov 5, 2015 at 11:11 AM, Lyle Ziegelmiller <lyle_z@hotmail.com> wrote:
> git push --set-upstream has some sort of race condition. Some times when I
> execute it, it works. Other times, it does not. Below is from my command
> window. I've executed the exact same command (using bash history
> re-execution, so I know I didn't make a typo), repeatedly. Notice the last
> execution results in an error. I am the only person on my machine. This is
> non-deterministic behavior.
>
> lylez@LJZ-DELLPC ~/gittest/local
> $ git push --set-upstream origin localbranch1
> Branch localbranch1 set up to track remote branch localbranch1 from origin.
> Everything up-to-date
>
> lylez@LJZ-DELLPC ~/gittest/local
> $ git push --set-upstream origin localbranch1
> Branch localbranch1 set up to track remote branch localbranch1 from origin.
> Everything up-to-date
>
> lylez@LJZ-DELLPC ~/gittest/local
> $ git push --set-upstream origin localbranch1
> error: could not commit config file .git/config
> Branch localbranch1 set up to track remote branch localbranch1 from origin.
> Everything up-to-date
>
> I'm using Git in a Cygwin window on a 32-bit Windows 10 machine.
If I recall correctly, the typical culprit is a Windows virus scanner
(or even an indexer) locking the file, so git is unable to manipulate
it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: race condition when pushing
2015-11-05 23:00 ` Eric Sunshine
@ 2015-11-17 13:25 ` Johannes Schindelin
[not found] ` <SNT153-DS16C364D3AE7608DB14B4E3F61D0@phx.gbl>
0 siblings, 1 reply; 4+ messages in thread
From: Johannes Schindelin @ 2015-11-17 13:25 UTC (permalink / raw)
To: Eric Sunshine; +Cc: Michael Haggerty, Lyle Ziegelmiller, git bug report
Hi Lyle & Eric,
On Thu, 5 Nov 2015, Eric Sunshine wrote:
> On Thu, Nov 5, 2015 at 11:11 AM, Lyle Ziegelmiller <lyle_z@hotmail.com> wrote:
> > git push --set-upstream has some sort of race condition. Some times
> > when I execute it, it works. Other times, it does not. Below is from
> > my command window. I've executed the exact same command (using bash
> > history re-execution, so I know I didn't make a typo), repeatedly.
> > Notice the last execution results in an error. I am the only person on
> > my machine. This is non-deterministic behavior.
> >
> > lylez@LJZ-DELLPC ~/gittest/local
> > $ git push --set-upstream origin localbranch1
> > Branch localbranch1 set up to track remote branch localbranch1 from origin.
> > Everything up-to-date
> >
> > lylez@LJZ-DELLPC ~/gittest/local
> > $ git push --set-upstream origin localbranch1
> > Branch localbranch1 set up to track remote branch localbranch1 from origin.
> > Everything up-to-date
> >
> > lylez@LJZ-DELLPC ~/gittest/local
> > $ git push --set-upstream origin localbranch1
> > error: could not commit config file .git/config
> > Branch localbranch1 set up to track remote branch localbranch1 from origin.
> > Everything up-to-date
> >
> > I'm using Git in a Cygwin window on a 32-bit Windows 10 machine.
Are you using Cygwin's own Git, or Git for Windows, or something else?
> If I recall correctly, the typical culprit is a Windows virus scanner
> (or even an indexer) locking the file, so git is unable to manipulate
> it.
In Git for Windows, we have code to work around this issue by detecting
in-use files and waiting for a staggered amount of time to re-try:
https://github.com/git-for-windows/git/blob/c6f19b078bf05643c4d50dd520280a80f19f0002/compat/mingw.c#L208-L231
This is used e.g. by our `rename()` wrapper:
https://github.com/git-for-windows/git/blob/c6f19b078bf05643c4d50dd520280a80f19f0002/compat/mingw.c#L1859-L1904
Please note that this code is active in Git for Windows (i.e. the *MinGW*
version of Git) but not in Cygwin Git (nor the MSys2 version of Git).
Ciao,
Dscho
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: race condition when pushing
[not found] ` <SNT153-DS16C364D3AE7608DB14B4E3F61D0@phx.gbl>
@ 2015-11-18 10:00 ` Johannes Schindelin
0 siblings, 0 replies; 4+ messages in thread
From: Johannes Schindelin @ 2015-11-18 10:00 UTC (permalink / raw)
To: Lyle Ziegelmiller; +Cc: Eric Sunshine, Michael Haggerty, git bug report
Hi Lyle,
your quoting seems a bit funny; I fixed it by indenting *my* words one
more level.
On Tue, 17 Nov 2015, Lyle Ziegelmiller wrote:
> [I, Johannes, wrote:]
>
> > Please note that this code is active in Git for Windows (i.e. the
> > *MinGW* version of Git) but not in Cygwin Git (nor the MSys2 version
> > of Git).
>
> May I suggest including this feature in Cygwin's Git, since it is
> exclusively used on Windows.
Please note that it is very easy for you to take up this task: refactor
the retry family of functions into their own file inside compat/win32/,
and a second commit to use them also in Cygwin.
> Thanks for working on Git!! :)
The best way of thanking is by contributing your own changes ;-)
Ciao,
Johannes
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-11-18 10:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-05 16:11 race condition when pushing Lyle Ziegelmiller
2015-11-05 23:00 ` Eric Sunshine
2015-11-17 13:25 ` Johannes Schindelin
[not found] ` <SNT153-DS16C364D3AE7608DB14B4E3F61D0@phx.gbl>
2015-11-18 10:00 ` Johannes Schindelin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.