GIT pull

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

GIT pull

From: cvalusek <hidden>
Date: 2016-06-15 22:53:34

My apologies if this isn't the appropriate place to post this. We are using
the windows port msysgit so I understand if I need to post over there first.

I have also posted this on stackoverflow. Here is a link to the question
there:

http://stackoverflow.com/questions/10110401/why-doesnt-git-clean-up-when-aborting-a-merge-triggered-from-pulling-in-changes

My team has had a lot of trouble with GIT lately because of aborted pull
commands.

If a user has local modifications not on the index and does a pull, I have
seen git attempt to start applying the merge to master and abort. The whole
checkout is then left in a terrible state that is nearly unrecoverable. In
the past, I thought GIT would run some sort of check to identify these
problems before it attempts the merge.

Even with a clean state (nothing to commit), I have seen the same thing
randomly happen at least once. I understand that without rebasing, you may
be forced to resolve merge conflicts when you pull, but this is not what is
happening though.

We are using gitolite. I am mainly using command line and have yet to run
into these issues. The rest of the team is using the git-gui or in 1 case
TortoiseGit.

git-gui version 0.13.GITGUI
git version 1.7.8.msysgit.0
Tcl/Tk version 8.5.1
TortoiseGit 1.7.6.0

We are not working with branches as much as we could, but feel like this
should be working.
Why does GIT allow you to try to pull when it is going to train-wreck?
Why does GIT not abort cleanly?

--
View this message in context: http://git.661346.n2.nabble.com/GIT-pull-tp7459655p7459655.html
Sent from the git mailing list archive at Nabble.com.

Re: GIT pull

From: Johannes Sixt <hidden>
Date: 2016-06-15 22:53:34

Am 12.04.2012 16:47, schrieb cvalusek:
My team has had a lot of trouble with GIT lately because of aborted pull
commands.

If a user has local modifications not on the index and does a pull, I have
seen git attempt to start applying the merge to master and abort. The whole
checkout is then left in a terrible state that is nearly unrecoverable. In
the past, I thought GIT would run some sort of check to identify these
problems before it attempts the merge.

Even with a clean state (nothing to commit), I have seen the same thing
randomly happen at least once.
As others pointed out, this should not happen. That leaves one
possibility: You are on Windows, and you very likely have one or more of

- a virus scanner
- an IDE

running. It can happen that one of these programs happen to look at a
file at the same moment when git is trying to remove or rename the file.
This fails because on Windows a file that is open cannot be removed or
renamed. In this situation, the merge/checkout is aborted in the middle
and leaves a mess behind.

There's not a lot that can be done about it. I thought we have some
counter measures in our compatibility layer (e.g., retry the removal if
the first attempt fails due to permissions), but I have seen this happen
nevertheless. I haven't tried tracking it down because it happens so
rarely for me, and it didn't hurt *too* much so far.

-- Hannes

Re: GIT pull

From: cvalusek <hidden>
Date: 2016-06-15 22:53:34

Looks like it's the virus scan. I had this e-mail that I accidentally sent to
Michael directly instead of the list:

I will see if I can build a script that reproduces the issue we are seeing. 

We are starting to speculate about what is going on now. Maybe our virus
scan is causing some git operation to fail in the middle of the merge.

The "terrible state" is a half-way applied merge.

--
View this message in context: http://git.661346.n2.nabble.com/GIT-pull-tp7459655p7460163.html
Sent from the git mailing list archive at Nabble.com.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help