0

I read several topic about storing binary files/blobs to Git and got that this is not good idea, and did not found any good approach.

I'd like to make Git to create git-objects - diffs of binary files - with a special tool, i.e. rdiff-backup.

Is it possible? How?

kyb
  • 7,233
  • 5
  • 52
  • 105

1 Answers1

0

The thing is : git does not store diffs, it stores plain files (see Pro Git book for example).

For storage : after a while (or after you call git gc), it tries to pack similar files into a packfile ( see here ), where it does somehow use the diff between two files.

I don't know if you can plug into the packfile creation with some external plugin, though.

You would also have to plug into git's similarity detection between files, which heavily relies on spotting similar lines (eg : chunks of bytes separated by '\n')

LeGEC
  • 46,477
  • 5
  • 57
  • 104