threads / discuss / 44113

.git directory tree as tar-file

Subject: .git directory tree as tar-file

## tl;dr

3 messages between Sep 19, 2016 and Sep 20, 2016.

replies: 2people: 3as markdown or json

Martin Bammer· Sep 19, 2016, 20:31 UTC · lore
Hi,

it would be nice to have an option to have a .git.tar instead of the .git directory tree. This tree quickly gets very big and copy and compare actions take very long. I've observed that even in small projects with only a few files the .git tree can contain several thousand entries. Especially when projects are saved on shares copy and compare actions are getting very slow. Is such a feature already planned or is there a chance to have such a feature in the near future?

Best regards,
Martin
Jacob Keller· Sep 19, 2016, 20:53 UTC · re: Martin Bammer · lore

Re: .git directory tree as tar-file

On Mon, Sep 19, 2016 at 1:31 PM, Martin Bammer <mrbm74@gmail.com> wrote:
Show 12 quoted lines
> Hi,
>
> it would be nice to have an option to have a .git.tar instead of the .git
> directory tree. This tree quickly gets very big and copy and compare actions
> take very long. I've observed that even in small projects with only a few files
> the .git tree can contain several thousand entries. Especially when projects are
> saved on shares copy and compare actions are getting very slow.
> Is such a feature already planned or is there a chance to have such a feature in
> the near future?
>
> Best regards,
>

It sounds like you're mis-using the git directory and attempting to share by copying it instead of using any of the protocols designed for sharing such as local file, ssh, or https.

I don't believe that storing the git via compression is really a good idea, as many of the operations inside are based on files and we already try to keep things compressed using various methods already (pack files)

If you want to actually share a git repository as a bundle, you can generate such a bundle. See "git help bundle" for more information.

Regards, Jake

> Martin
>
Anatoly Borodin· Sep 20, 2016, 00:48 UTC · re: Martin Bammer · lore

Re: .git directory tree as tar-file

Hi Martin,

if multiple small loose files are the problem, this could be interesting for you:

https://git-scm.com/docs/git-gc

This command is run automatically from time to time, and you can configure it or run manually.

PS To see how bad the situation is, you can use
https://git-scm.com/docs/git-count-objects
-- 
Mit freundlichen Grüßen,
Anatoly Borodin

← back to recent threads