Does anyone know where I can store extra resources of my own in the .git 
directory?  I'm writing a git extension with some fairly expensive analytic 
computations that I'd like to cache, so that partial results can be reused 
across multiple invocations.

I was hoping to find some kind of "userspace" 
where my git extensions can save items that shouldn't be associated with a 

For example, if I have a results file, would it be reasonable for me to add 
it the object store using git-hash-object, and then put the SHA1 of that 
blob in .git/refs/blobs/my-cached-results?  Or, if I have several different 
files I want to save, could I bundle them under a tree object (presumably 
using git-write-tree), and save that SHA1 to 
.git/refs/trees/my-cached-files?  Assuming that the files were the standard 
format of 40 hex characters plus newline, would this be sufficient to 
protect the trees/blobs from garbage collection?

Or am I better off *not* using the object store?  If I should just write 
results into a file somewhere under the .git directory, is there a 
recommended place to put such things so that I'm relatively unlikely to 
collide with future git features?



You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
For more options, visit

Reply via email to