* bug: git fetch reports too many unreachable loose objects
@ 2018-12-08 2:12 Josh Wolfe
2018-12-08 2:23 ` Elijah Newren
0 siblings, 1 reply; 2+ messages in thread
From: Josh Wolfe @ 2018-12-08 2:12 UTC (permalink / raw)
To: git
git version 2.19.1
steps to reproduce:
# start in a brand new repo
git init
# create lots of unreachable loose objects
for i in {1..10000}; do git commit-tree -m "$(head -c 12 /dev/urandom
| base64)" "$(git mktree <&-)" <&-; done
# this prints a lot of output and takes a minute or so to run
# trigger git gc to run in the background
git fetch
# Auto packing the repository in background for optimum performance.
# See "git help gc" for manual housekeeping.
# trigger it again
git fetch
# Auto packing the repository in background for optimum performance.
# See "git help gc" for manual housekeeping.
# error: The last gc run reported the following. Please correct the root cause
# and remove .git/gc.log.
# Automatic cleanup will not be performed until the file is removed.
#
# warning: There are too many unreachable loose objects; run 'git
prune' to remove them.
# to manually fix this, run git prune:
git prune
# note that `git gc` does not fix the problem, and appears to do
nothing in this situation:
git gc
According to the `git fetch` output, the `git help gc` docs, and the
`git help prune` docs, I don't think I shouldn't ever have to run `git
prune` manually, so this behavior seems like a bug to me. Please
correct me if this is expected behavior.
In case anyone's wondering why I'm creating unreachable loose objects,
here's the usecase: https://stackoverflow.com/a/50403179/367916 . I
would love a first-class solution to obviate that workaround, but that
is probably a separate issue.
Josh
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: bug: git fetch reports too many unreachable loose objects
2018-12-08 2:12 bug: git fetch reports too many unreachable loose objects Josh Wolfe
@ 2018-12-08 2:23 ` Elijah Newren
0 siblings, 0 replies; 2+ messages in thread
From: Elijah Newren @ 2018-12-08 2:23 UTC (permalink / raw)
To: josh; +Cc: Git Mailing List
On Fri, Dec 7, 2018 at 6:14 PM Josh Wolfe <josh@okcupid.com> wrote:
>
> git version 2.19.1
> steps to reproduce:
>
> # start in a brand new repo
> git init
>
> # create lots of unreachable loose objects
> for i in {1..10000}; do git commit-tree -m "$(head -c 12 /dev/urandom
> | base64)" "$(git mktree <&-)" <&-; done
> # this prints a lot of output and takes a minute or so to run
>
> # trigger git gc to run in the background
> git fetch
> # Auto packing the repository in background for optimum performance.
> # See "git help gc" for manual housekeeping.
>
> # trigger it again
> git fetch
> # Auto packing the repository in background for optimum performance.
> # See "git help gc" for manual housekeeping.
> # error: The last gc run reported the following. Please correct the root cause
> # and remove .git/gc.log.
> # Automatic cleanup will not be performed until the file is removed.
> #
> # warning: There are too many unreachable loose objects; run 'git
> prune' to remove them.
>
> # to manually fix this, run git prune:
> git prune
>
> # note that `git gc` does not fix the problem, and appears to do
> nothing in this situation:
> git gc
>
>
> According to the `git fetch` output, the `git help gc` docs, and the
> `git help prune` docs, I don't think I shouldn't ever have to run `git
> prune` manually, so this behavior seems like a bug to me. Please
> correct me if this is expected behavior.
Known bug, there are a variety of other ways to trigger it too. See
the threads here for more info:
https://public-inbox.org/git/87inc89j38.fsf@evledraar.gmail.com/
https://public-inbox.org/git/20180716172717.237373-1-jonathantanmy@google.com/
There are probably other threads as well.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-08 2:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-08 2:12 bug: git fetch reports too many unreachable loose objects Josh Wolfe
2018-12-08 2:23 ` Elijah Newren
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).