1

I use TortoiseGit for my repositories but sometimes I right-click and select Git GUI Here. Why does it sometimes show this:

Loose Objects

I let it compress the database. But TortoiseGit is not mentioning anything about this.

Unlike similar questions I am asking why Git GUI raises a message about loose objects and Tortoise Git does not. Thus it is not exactly the same as the nominated duplicate question.

Andrew Truckle
  • 17,769
  • 16
  • 66
  • 164
  • 2
    Possible duplicate of [What are the "loose objects" that the Git GUI refers to?](http://stackoverflow.com/questions/5709687/what-are-the-loose-objects-that-the-git-gui-refers-to) – Schwern Feb 21 '17 at 19:15
  • @Schwern I am not specifically asking what loose objects are. I am asking why Git GUI prompts me about them but TortoiseGit does not. – Andrew Truckle Feb 21 '17 at 21:15
  • @AndrewTruckle the accepted answer doesn't contain anything about the difference between TortoiseGit and Git GUI. As such I would assume your question doesn't really revolve around this difference and is indeed a duplicate. – Sascha Wolf Feb 22 '17 at 08:03
  • @Zeeker I accepted the answer because they were courteous enough to help. Thank you. – Andrew Truckle Feb 22 '17 at 08:05

1 Answers1

4

"Loose objects" mean objects that are individual files on the filesystem rather than in more efficient packfiles. "Compress the database" probably means it'll run git gc. See also this answer to What are the “loose objects” that the Git GUI refers to?

These days Git will, from time to time, clean them up for you by running garbage collection, git gc. There's no need to prompt the user. This feels like Git GUI has a hold over from years ago when Git did not do its own garbage collection. My understanding is 2880 is a fairly low number of loose objects.

Check that you haven't inadvertently set gc.auto to 0 with git config gc.auto.

Community
  • 1
  • 1
Schwern
  • 153,029
  • 25
  • 195
  • 336
  • 2
    Technically, "loose" just means "not packed", not necessarily unreferenced. But yes, I think GitGUI is just being silly here. :-) – torek Feb 20 '17 at 19:39
  • @torek Thanks, I've updated the answer and found a better answer. – Schwern Feb 21 '17 at 19:15