Skip to content

Conversation

skshetry
Copy link
Collaborator

@skshetry skshetry commented May 6, 2025

This _get_remote_config() should use uninitialized=True so that it supports more broader kinds of broken/partially-initialized repositories, including some that have .dvc directory missing, or .git directory missing.

This partially reverts #10719. #10608 is also fixed, and no longer requires core.no_scm to be passed. This was already supported by dvc.api.get_url() as it uses uninitialized=True, but this was not respected in _get_remote_config() where it would fail before.

That said, this whole open_repo/_get_remote_config is terribly broken. For one, it is opening a local repository, and forcing it's remote config to a repository opened with Repo(rev=...), where the config may be different.

@skshetry skshetry enabled auto-merge (squash) May 6, 2025 08:16
This `_get_remote_config()` should use `uninitialized=True` so that it supports
more broader kinds of broken/partially-initialized repositories, including some that have
`.dvc` directory missing, or `.git` directory missing.

This partially reverts #10719. #10608 is also fixed, and no longer requires `core.no_scm` to be passed.
This was already supported by `dvc.api.get_url` as it uses `uninitialized=True`, but this was not respected
in `_get_remote_config()` where it would fail before.

That said, this whole `open_repo`/`_get_remote_config` is terribly broken. For one, it is opening
a local repository, and forcing it's remote config to a repository opened with `Repo(rev=...)`,
where the config may be different.
@skshetry skshetry merged commit 415d4bc into main May 6, 2025
40 checks passed
@skshetry skshetry deleted the fix-10608 branch May 6, 2025 08:39
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.

1 participant