All of lore.kernel.org
 help / color / mirror / Atom feed
* gc.linkedobjectdir discussion
@ 2015-02-24 21:56 Will Entriken
  2015-02-24 22:26 ` Junio C Hamano
  0 siblings, 1 reply; 2+ messages in thread
From: Will Entriken @ 2015-02-24 21:56 UTC (permalink / raw)
  To: git

Hello,

This post presents an idea for storing git objects into a hard-linked
shared directory which would allow performance gains and safety so
that users can set it and forget it.

SETUP:
Users run `git config --global gc.linkedobjectdir ~/.gitsharedobjects`

USAGE - CACHE MISS:
During a pull, git will look for the needed object in LINKEDOBJECTDIR,
similar to how it looks in GIT_ALTERNATE_OBJECT_DIRECTORIES. If it is
not found, the object is received as normal and then hard linked into
the object store at LINKEDOBJECTDIR.

USAGE - CACHE HIT:
During another pull or clone on a different working directory, git
will find the required object in LINKEDOBJECTDIR and hard link into
the active repo's object store.

USAGE - DELETING:
Whenever deleting an object, git will stat the file to see to see if
its link count is 2, if so, both copies are deleted.

PERIODIC MAINTENANCE:
Periodically, git will check all objects in LINKEDOBJECTDIR for a link
count of 1 and delete such files. This will happen if a repository
with linking is deleted with `rm -rf`.

This feature would be a benefit to organizations which do lots of
cloning (think Travis CI) or users that clone the same project
multiple times or have the same file used across different repos.

Please share your thoughts.

Thank you,
Will

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-24 22:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-24 21:56 gc.linkedobjectdir discussion Will Entriken
2015-02-24 22:26 ` Junio C Hamano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.