Skip to content

Do not override library edit history from XMP sidecar file when using darktable-cli#21488

Open
da-phil wants to merge 2 commits into
darktable-org:masterfrom
da-phil:xmp_history_stack_overrides_library_bugfix
Open

Do not override library edit history from XMP sidecar file when using darktable-cli#21488
da-phil wants to merge 2 commits into
darktable-org:masterfrom
da-phil:xmp_history_stack_overrides_library_bugfix

Conversation

@da-phil

@da-phil da-phil commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

When darktable-cli is executed via the --library <db> and the RAW file to be exported has an associated (potentially stale) XMP sidecar file, the library history stack gets overridden. This change proposes to prefer the library database history entry over an existing XMP sidecar file once the --library argument is provided to darktable-cli.

When darktable-cli is executed via the --library <db>
and the file to be exported has an associated (potentially stale)
XMP sidecar file, the library history stack gets overridden.
This change proposes to prefer the library database history entry
over an existing XMP sidecar file once the --library argument is
provided to darktable-cli.
@da-phil da-phil force-pushed the xmp_history_stack_overrides_library_bugfix branch from c1a11ba to 8ff4464 Compare July 4, 2026 18:07
@da-phil da-phil changed the title Do not override library edit history from XMP Do not override library edit history from XMP sidecar file when using darktable-cli Jul 4, 2026
@jenshannoschwalm

Copy link
Copy Markdown
Collaborator

I didn't check this in source but - what about the memory database? That's safe i guess?

@da-phil

da-phil commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Good point, thought about this too.
The question is: is this a real use-case? Starting darktable-cli --library :memory: ... to (batch) export files.
I think this only makes sense when launching darktable GUI to edit files while not breaking your regular DB.
But maybe I can add another check to make sure that --library :memory: still gives preference to XMP history stacks, as there is simply nothing in that database 😅

@da-phil

da-phil commented Jul 4, 2026

Copy link
Copy Markdown
Contributor Author

Well, I just made extra sure that we do not have to deal with --library :memory: for darktable-cli ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants