In our case we are storing videos using timestamp in the filename, e.g.
2024.03.08.09.31.09.041_2024.03.08.09.34.53.759.mkv
where last number is ms
. git-annex
for MD5E decides that extension is .759.mkv
, so if we rename file (adjust timing), it seems to produce a new key.
I wonder if you have any ideas Joey on how to overcome it (smarter extension deduction? some config to "hardcode" target extension to be .mkv?)?
Just throwing against the wall to see if sticks
Of course, choosing a backend that does not include extension is something worth considering. Unless something needs the object file to preserve the extension. For a .mkv file, I'd guess most video players don't care about the extension.
annex.maxextensionlength won't help here, but I think it makes sense to add an analagous annex.maxextensions which would default to 2 (as it currently does to handle .tar.gz) but you could set to 1.
It might also be a reasonable argument that filename extensions are not just numbers, but then again, foo.1.pdf foo.2.pdf is a pretty common kind of pattern, although the extent that the numbers in that are extensions with any meaning to a program would depend. Some archivers do eg split files into foo.1 foo.2 foo.3 and use the extensions to get them back. Anyway, the same kind of problem could happen when not using only numbers.