threads / discuss / 17209

Confusing text in git-prune.txt

Subject: Confusing text in git-prune.txt

## tl;dr

3 messages between Jan 16, 2009 and Jan 16, 2009.

replies: 2people: 2as markdown or json

Adeodato Simó· Jan 16, 2009, 16:50 UTC · lore
From git-prune.txt:
    [...] prunes all unpacked objects unreachable from any of
    these head objects from the object database. In addition,
    it prunes the unpacked objects that are also found in packs by
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    running git-prune-packed.

How can "unpacked objects" be "found in packs"? Maybe the first "unpacked" should be "unreachable". But if that's the case, wouldn't this be better:

    [...] prunes from the object database all objects unreachable from
    any of these heads. Prunning already-packed objects is done with
    the help of git-prune-packed.
Thoughts? Or am I reading the original text wrong?
-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
I promise you. Once I enter into an exclusive relationship, I sleep with
very few people.
                -- Denny Crane
Johannes Sixt· Jan 16, 2009, 16:56 UTC · re: Adeodato Simó · lore

Re: Confusing text in git-prune.txt

Adeodato Simó schrieb:
Show 9 quoted lines
> From git-prune.txt:
> 
>     [...] prunes all unpacked objects unreachable from any of
>     these head objects from the object database. In addition,
>     it prunes the unpacked objects that are also found in packs by
>     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     running git-prune-packed.
> 
> How can "unpacked objects" be "found in packs"?

An object can exist more than once in the database. prune-packed removes the loose (unpacked) instance of the object if it also available in a pack.

-- Hannes
Adeodato Simó· Jan 16, 2009, 17:02 UTC · re: Johannes Sixt · lore

Re: Confusing text in git-prune.txt

* Johannes Sixt [Fri, 16 Jan 2009 17:56:05 +0100]:
> Adeodato Simó schrieb:
> > From git-prune.txt:
Show 5 quoted lines
> >     [...] prunes all unpacked objects unreachable from any of
> >     these head objects from the object database. In addition,
> >     it prunes the unpacked objects that are also found in packs by
> >     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> >     running git-prune-packed.
> > How can "unpacked objects" be "found in packs"?
> An object can exist more than once in the database. prune-packed removes
> the loose (unpacked) instance of the object if it also available in a pack.
Ah, thanks, that explains everything.

I read the manpage for git-prune-unpacked, but I didn't manage to figure it out. It may have helped if instead of saying:

    git-prune-packed - Remove extra objects that are already in pack files
it would have said:
    git-prune-packed - Remove loose objects that are already in pack files
                              ^^^^^

By stating that those objects are "extra", we're losing the information of where are they. And by reading that synopsis, one can already infer they are "extra".

Cheers,
-- 
Adeodato Simó                                     dato at net.com.org.es
Debian Developer                                  adeodato at debian.org
 
                                 Listening to: Radiohead - Bodysnatchers

← back to recent threads