git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [git-sizer] Implications of a large commit object

From
Michael Haggerty <mhagger@alum.mit.edu>
Date
Mar 14, 2018, 08:33 UTC
Message-ID
<CAMy9T_GdYjUm9DqcgrC=NxyTbZk_ep5rvAAK2J=zwhiSMyvaLA@mail.gmail.com>
In-Reply-To
<953C263C-6ECA-46AC-849C-8D1A38378654@gmail.com>

On Wed, Mar 14, 2018 at 9:14 AM, Lars Schneider <larsxschneider@gmail.com> wrote:

Show 26 quoted lines
> I am using Michael's fantastic Git repo analyzer tool "git-sizer" [*]
> and it detected a very large commit of 7.33 MiB in my repo (see chart
> below).
>
> This large commit is expected. I've imported that repo from another
> version control system but excluded all binary files (e.g. images) and
> some 3rd party components as their history is not important [**]. I've
> reintroduced these files in the head commit again. This is where the
> large commit came from.
>
> This repo is not used in production yet but I wonder if this kind of
> approach can cause trouble down the line? Are there any relevant
> implication of a single large commit like this in history?
> [...]
>
> #######################################################################
> ## git-sizer output
>
> [...]
> | Name                         | Value     | Level of concern               |
> | ---------------------------- | --------- | ------------------------------ |
> [...]
> | Biggest objects              |           |                                |
> | * Commits                    |           |                                |
> |   * Maximum size         [1] |  7.33 MiB | !!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
> [...]

The "commit size" that is being referred to here is the size of the actual commit object; i.e., the author name, parent commits, etc plus the log message. So a huge commit probably means that you have a huge log message. This has nothing to do with the number or sizes of the files added by the commit.

Maybe your migration tool created a huge commit message, for example listing each of the files that was changed.

AFAIK this won't cause Git itself any problems, but it's likely to be inconvenient. For example, when you type `git log` and 7 million characters page by. Or when you use some GUI tool to view your history and it performs badly because it wasn't built to handle such enormous commit messages.

Michael
Previous: Lars SchneiderNext: Lars Schneider
Message 2 of 4 in “[git-sizer] Implications of a large commit object”
  1. Lars SchneiderMar 14, 2018
  2. Michael HaggertyMar 14, 2018
  3. Lars SchneiderMar 14, 2018
  4. Jeff KingMar 14, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.