dolthub / dolthub/dolt

dolt clean should behave like git clean

Open
#6,313 1 comment 0 reactions 0 assignees View on GitHub
cli enhancement
Dominant language
Go
Stars
24.4k
Forks
873
Avg merge
1d 5h
Merged PRs (30d)
108

Description

Currently `dolt clean` does what it says it will do, but not in a way that speaks to the user. `git clean` will list the files it's cleaning, and has flags which indicate how you want to handle ignored files. The `--dry-run` flag prints out specifically what it will clean up which differs from how `dolt clean --dry-run` just sets the exit status to indicate that it would be successful if a wet run was done. `dolt clean` doesn't respect the dolt_ignore table at all currently.

This limitation reaches the dolt_clean() stored procedure as well. The procedure only has an exit status of 0 or 1, so it can't give any useful information to the caller.

Rethinking the command and the interface for the procedure to solve a specific customer interaction seems like it's in order. At present many of our tests use it to clean up, but there are no specific tests for cleaning directly. So it probably works, but might not.

Ideas to consider:
* Deprecate the command
* More closely match the behavior of git: https://git-scm.com/docs/git-clean

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.