package ee.shy.cli.command;

import ee.shy.cli.Command;
import ee.shy.cli.HelptextBuilder;
import ee.shy.core.LocalRepository;
import ee.shy.core.Repository;


import java.io.IOException;

/**
 * Shows information of current state (branch and commit hash)
 */
public class StatusCommand implements Command{
    @Override
    public void execute(String[] args) throws IOException {
        Repository repository = LocalRepository.newExisting();
        System.out.println(repository.getCurrent().toString());
    }

    @Override
    public String getHelp() {
        return new HelptextBuilder()
            .addWithoutArgs("Show information of current state.")
            .addDescription("Shows information of current state.")
            .create();
    }

    @Override
    public String getHelpBrief() {
        return "Display current state";
    }
}

@@ -152,17 +152,16 @@
 itory;%0A%0A
-%0A
 import j
@@ -490,19 +490,8 @@
 nt()
-.toString()
 );%0A 

Remove unnecessary toString()