BF/RF: create-sibling follow diff with constant_refs=False + operate on committed subds #6603
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Initial motivation for this change was fixing
#6596
where while specifying --since, create-sibling did not detect needing to
create a sibling for a subdataset. A stale (missed during #6528 OPT/RF)
comment said that value of constant_refs=True should not matter since it was
not recursive originally. But now here we do recurse and it does matter since
we migth completely skip subtree where such refs are not yet known. Changing
to False resulted in the test failing which made me realize that sibling was
created even for not yet committed changes to submodules. Since for push it
would really not work to push something which is not yet saved, I think the
change in behavior for create-sibling is also desired. And it fixes #6596.
So I have "fixed" and expanded test with the problematic case I had
discovered.
Changelog
🐛 Bug Fixes
create-sibling
will no longer create siblings for not yet saved new subdatasets, andwill now create sub-datasets nested in the subdatasets which did not yet have those
siblings. Fixes "No datasets qualify for sibling creation." although some should be created #6596