Skip to content

Return a Repository instance when doing Init #101

Closed
@uluhonolulu

Description

@uluhonolulu

Why do you want to return the path to the new repository instead of the repository object? I find the actual repo path not as relevant as a reference to the actual repo instance. Instead of doing

string path = Repository.Init(location); 
using (Repository repo = new Repository(path))
{
   // Code, code , code
}

why not just

using (Repository repo = Repository.Init(location))
{
   // Code, code , code
}

Same with Clone, don't you think it would be more convenient to return the instance of the repository (which is being created inside the method anyway)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions