I'm trying to use git notes to store some (small) blobs of data. I almost have it working, but I'm having trouble when I try to fetch the data to another machine.
I'm using git hash-object
and storing the returned hash in the note.
git hash-object -w timestamp.signed.tsr | git notes --ref=timestamps add --file -
I can push and fetch the notes that contain the hashes using the method outlined in Note to Self.
git push origin refs/notes/timestamps
git fetch origin refs/notes/*:refs/notes/*
However, I can't figure out how to get the blob objects to go along with it. I'm fairly certain my blob objects aren't getting pushed to origin. The way I'm checking is after pushing a note of 0dd470d2fc5556de62d813537fd483aede2f6b35
, which should be the hash of a blob object, I go to the machine with my bare repository and look for objects/0d/d470d2fc5556de62d813537fd483aede2f6b35
. Since it's not there, I assume it's never getting pushed.
Is there something simple I'm overlooking that I need to do so git knows the blob objects are referenced by the notes? Would it be better to store the data directly in the note? Would it be better to base64 encode the data and store it directly in the note?
Any tips would be appreciated.