Re: Are concurrent git operations on the same repo safe?
On Tue, Feb 6, 2018 at 3:16 AM, Ian Norton <inorton@gmail.com> wrote:
Show 8 quoted lines
> Hi all,
>
> I'm generally used to the idea that if a thing is not marked as
> "thread-safe" then it isn't thread safe, but I thought I'd ask anyway
> to be sure.
>
> Is it safe for me to do several operations with git concurrently on
> the same local repo?
Off the top of my head, object database access (e.g. things in .git/objects), refs updates (.git/refs) and .git/index should handle concurrent operations fine (or in the worst case you get "some operation is ongoing, aborted" and you need to try again but not corruption or anything else). I think we generally try to make it safe concurrently.
> Specifically I'm trying to speed up "git
> submodule update" by doing several at the same time. I've noticed
> some odd side effects afterwards though when trying to commit changes
> to my super project.
submodule is a hot area with lots of development lately I think, perhaps you're seeing some bugs... CCing at least one submodule person...
Show 5 quoted lines
> Apologies if this is answered elsewhere, my google-foo is weak today.
>
> Many thanks
>
> Ian
--
Duy