threads / discuss / 58817

[Q] Where does "git commit -q -m msg" spend time?

Subject: [Q] Where does "git commit -q -m msg" spend time?

## tl;dr

One message between Nov 19, 2022 and Nov 19, 2022.

replies: 0people: 1as markdown or json

Junio C Hamano· Nov 18, 2022, 23:37 UTC · lore

On a slow filesystem it gets more noticeable, but I have been wondering (without a debugger or a profiler, as I am supposed to be on vacation) for the past few weeks why these two commands in the same repository perform very differently:

    $ git write-tree
    $ git commit -q -m msg

Especially even after running the former, running the latter, which I naïvely thought that it only needs to create a commit object with "msg" and wrapping the result of the former (which is more-or-less instant) into it, and do nothing else.

← back to recent threads