#497687 git-gui: Garbage collection warning triggers too easily

#497687#5
Date:
2008-09-03 14:46:58 UTC
From:
To:
When git gui starts it does a check to see how many loose objects are in
the repository and displays a warning if this is over a certain number,
offering to do a gc.  Since I track trees like linux-next that are
rebased and do a lot of local rebases myself I constantly run with a
large number of unpacked objects in my tree which won't be packed by gc
and hang around due to reflog and aging, meaning that the warning
constantly goes off even if I opt to run gc when prompted.

Since the manual lists no way of disabling the warning and the garbage
collection which is suggested by the dialog doesn't actually resolve the
problem this is highly irritating.  Ideally the warning would only go
off if running gc were able to resolve the problem.

#497687#10
Date:
2008-11-05 00:52:57 UTC
From:
To:
Hi, please see git-config(1), and search for garbage.  You can adjust
the settings repo-specific, I'm afraid there isn't any default that fits
all users.

Thanks, Gerrit.

#497687#15
Date:
2008-11-05 10:20:49 UTC
From:
To:
I really don't think that's an adequate way of addressing the problem -
for such an obtrusive warning it really needs to work well.  Even if the
warning suggested that gc might not do the job and need configuration
it'd be an advance on the current situation.  The software pops up a
dialog saying "you need to repack", you do the repack and then the
dialog keeps popping up with no hint as to anything else you should do -
I really can't see any way of describing that other than as a UI bug.

Please reopen this bug.

#497687#22
Date:
2010-02-13 00:06:47 UTC
From:
To:
tags 497687 + upstream
severity 497687 important
thanks

Hi Mark,

Mark Brown wrote:

Indeed, this is just stupid.  I would like to investigate this soon
(sorry to keep you waiting for so long!) and probably looking at the
source will be enough, but just in case, it would be nice to know:

 - Can you still reproduce this with current git?

 - Would it be possible to tar up a .git directory with this problem
   somewhere I can look at it?  Alternatively, is there a simple and
   reliable recipe for reproducing this?

Yep.  At the very least, it would be better UI design to provide a
“don’t ask me again” check box!

Thanks for the report,
Jonathan

#497687#31
Date:
2010-02-13 00:52:02 UTC
From:
To:
Yes, it's present in unstable.

Generating a lot of objects referenced only via the reflog (eg, via
lots of rebases and tracking a tree like -next which has lots of
transitory objects should do the trick. I'll check into what's in my
main work tree and see if I can disclose it.

Indeed, that would solve the problem for me.

#497687#36
Date:
2010-02-13 02:05:27 UTC
From:
To:
Mark Brown wrote:

It turns out I can reproduce this with my local linux-2.6 tree, so
there’s no need.

Thanks for the quick response.

Jonathan