Skip to content

Post commit hook traverses submodules, causing git commit to take an extremely long time to complete #3638

@rcdailey

Description

@rcdailey

Maybe similar to #3490, but I opened a new issue since the root cause might be different.

Here is the command I run:

GIT_TRACE=1 git commit -a --amend --no-edit

The trace file is attached here: commit-trace.txt

My repository structure has 2 submodules in it. Here is my .gitmodules:

[submodule "zPayService/ZPayUtilities"]
    path = zPayService/ZPayUtilities
    url = ../zpay-utilities.git
[submodule "Core"]
    path = Core
    url = ../core.git
    branch = .

The Core submodule is also an LFS repository. The post-commit started going into the Core subdirectory, which it shouldn't do because that's a submodule. Evidence is shown in the attached trace, here's a small snippet:

12:29:47.164317 trace git-lfs: filepathfilter: accepting "Core/External/PowerVR/source/external/concurrent_queue"
12:29:47.164317 trace git-lfs: filepathfilter: accepting "Core/External/PowerVR/source/LICENSE_POWERVR_SDK.txt"
12:29:47.164317 trace git-lfs: filepathfilter: accepting "Core/External/PowerVR/source/include/CL"

Because the post commit hook is traversing the submodule files, it makes commits in the parent repository take a very long time. Is this a bug or a configuration issue?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions