Re: clarify git clone --local --shared --reference

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shawn O. Pearce wrote:
Brandon Casey <casey@xxxxxxxxxxxxxxx> wrote:

The docs (git-repack.txt) seem to suggest that git-repack (without -d) does not delete any objects. And if -d is used, then at most objects already referenced in other packs will be deleted. This makes me think that repack is safe on the source repository.

You are correct that leaving off the '-d' won't delete objects.
But a pack is created by listing the objects we need, and if we don't
need the object in source, we don't include it into the new pack.

-a -d implies delete all packs that existed when we started the
repack.  So if an object was in the old packfile, and we didn't
copy it to the new packfile, it gets deleted.  ;-)

Ok. There is the connection I did not make. repack -d is NOT harmless, since a pack that contains only objects referenced in other packs and dangling unreferenced objects, will be deleted. Which will be all of the preexisting packs in the case of git-gc since as you mentioned it repacks using -a -d -l.

Thanks for taking the time.

-brandon

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux