Skip to content

dolt init fails if dolt config is run without global arguments #8835

Closed
@societal-sandpaper

Description

I think there may be one or two separate bugs covered by this.

Overall bug: It seems to be impossible to make a new repo on dolthub, and then initialize it with a non-global email/name config.

Reproduction

  1. Create a dolthub repo
  2. Bug 1: Try to clone the repo right away. Get an error like "clone failed; remote at that url contains no Dolt data". GitHub adds an initial empty commit which allows you to clone a repo right away (very helpful).
  3. Emotionally accept that you can't clone it right away.
  4. mkdir new-repo ; cd new-repo
  5. dolt init
  6. See error message (acceptable): Author identity unknown. Run dolt config... .... Omit --global to set the identity only in this repository.
  7. Run the non-global dolt config commands: dolt config --add user.email ... and dolt config --add user.name ...
  8. Bug 2: Try dolt init. See that it fails: Failed to initialize directory as a data repo. .dolt directory already exists at '.'
  9. Try dolt remote add origin .... See that it fails: The current directory is not a valid dolt repository. I suppose this is expected.

Suggested Improvements

Any of these would fix the overall . I'd suggest that all of them should be implemented:

  1. Fix Bug 1: Allow cloning a brand-new repo. (Tracked in dolt shouldn't create an init commit #2361)
  2. Fix Bug 2: Allow dolt init if the only thing in the .dolt folder of a repo is a config.json.

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions