Skip to content

Don't add a new version when there are no file changes #20

Description

@marcolarosa

Creating this ticket to track enhancement request from email discussion.

Problem statement:

I notice that if I try to check in a datafile a second time I get a v2 folder in the OCFL repo but the content folder is empty because the library has correctly determined that nothing changed. Is that an artefact of the library implementation or is that the defined behaviour of OCFL?

To my mind it would be nice to be able to say here's a deposit folder for ingestion and know that a new version is not created if the content is not different to what already exists. That way, I don't have to figure out if a person (for example) entry has already been written in order to avoid littering the space with many empty versions after the first write.

Response from @spikelynch

I think it’s more an artefact of the library than a strict implementation of OCFL, although, off the top of my head, I think the standard allows for a null version (ie no change). Reasonable library behaviour, I think, would be to do as you say by default – not create an empty version if there’s no new content – and maybe have a flag to force versioning if some other application requires it. That’s assuming that the standard permits empty versions – if I’m wrong about that, then it shouldn’t be able to create one.

Response from @ptsefton:

We just had a chat about this here – basically if the version you are adding is the same as the head version then we CAN make it do nothing, but there are cases where you will still end up with an empty directory – eg if the new version the same as the last but with deletions, or you are re-instating stuff that was in previous versions.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions