Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datalad should refuse certain actions in uninitialized submodules (subdatasets) #7595

Open
mlell opened this issue May 10, 2024 · 0 comments
Labels
UX user experience

Comments

@mlell
Copy link

mlell commented May 10, 2024

What is the problem?

One of git's bad UX habits is that when the current working directory is a submodule that is not present (unnitialized), it will execute its actions on the parent repository. I repeatedly had to explain this to my non-technical colleagues who did not understand error messages or datalad dropped all data from their main dataset by accident because the submodule was not there.

I think that when the current working directory is a subdataset which is not initialized, datalad should refuse to take any action other than datalad get, informing the user that they are in a subdataset which is not present. This would make datalad drop indempotent -- repeating datalad drop on a folder would give the same result regardless of whether I do it once or twice. In my opinion, this is what users expect.

What steps will reproduce the problem?

  • Create and save a subdataset
  • Drop that subdataset
  • cd into the folder of the subdataset
  • Execute any action, e.g. "datalad drop".

Expected: Datalad will tell the user that the current dataset has already been dropped. Other datalad commands except "get" might issue an error telling the user that they first need to "get" the dataset before taking any action on it

Actual behavior: Datalad will silently fall back to the superdataset. I can imagine no situation where the user would want that given that the current working directory is the subdataset

DataLad information

No response

Additional context

No response

Have you had any success using DataLad before?

No response

@yarikoptic yarikoptic added the UX user experience label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
UX user experience
Projects
None yet
Development

No branches or pull requests

2 participants