package gitflow;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import git4idea.commands.Git;
import git4idea.commands.GitCommandResult;
import git4idea.commands.GitLineHandlerListener;
import git4idea.repo.GitRemote;
import git4idea.repo.GitRepository;

/**
 * @author Opher Vishnia / opherv.com / opherv@gmail.com
 */
public interface Gitflow extends Git {

    public GitCommandResult initRepo(@NotNull GitRepository repository,
                                     GitflowInitOptions initOptions, @Nullable GitLineHandlerListener... listeners);


    // feature

    GitCommandResult startFeature(@NotNull GitRepository repository,
                                  @NotNull String featureName,
                                  @Nullable String baseBranch,
                                  @Nullable GitLineHandlerListener... listeners);

    GitCommandResult finishFeature(@NotNull GitRepository repository,
                                   @NotNull String featureName,
                                   @Nullable GitLineHandlerListener... listeners);

    GitCommandResult publishFeature(@NotNull GitRepository repository,
                                    @NotNull String featureName,
                                    @Nullable GitLineHandlerListener... listeners);

    GitCommandResult pullFeature(@NotNull GitRepository repository,
                                 @NotNull String featureName,
                                 @NotNull GitRemote remote,
                                 @Nullable GitLineHandlerListener... listeners);

    GitCommandResult trackFeature(@NotNull GitRepository repository,
                                  @NotNull String featureName,
                                  @NotNull GitRemote remote,
                                  @Nullable GitLineHandlerListener... listeners);

    //release

    GitCommandResult startRelease(@NotNull GitRepository repository,
                                  @NotNull String releaseName,
                                  @Nullable GitLineHandlerListener... listeners);


    GitCommandResult finishRelease(@NotNull GitRepository repository,
                                   @NotNull String releaseName,
                                   @NotNull String tagMessage,
                                   @Nullable GitLineHandlerListener... listeners);


    GitCommandResult publishRelease(@NotNull GitRepository repository,
                                    @NotNull String releaseName,
                                    @Nullable GitLineHandlerListener... listeners);

    GitCommandResult trackRelease(@NotNull GitRepository repository,
                                  @NotNull String releaseName,
                                  @Nullable GitLineHandlerListener... listeners);

    //hotfix

    GitCommandResult startHotfix(@NotNull GitRepository repository,
                                 @NotNull String hotfixName,
                                 @Nullable String baseBranch,
                                 @Nullable GitLineHandlerListener... listeners);

    GitCommandResult finishHotfix(@NotNull GitRepository repository,
                                  @NotNull String hotfixName,
                                  @NotNull String tagMessage,
                                  @Nullable GitLineHandlerListener... listeners);

    GitCommandResult publishHotfix(@NotNull GitRepository repository,
                                   @NotNull String hotfixName,
                                   @Nullable GitLineHandlerListener... listeners);
}

@@ -15,94 +15,8 @@
 w;%0A%0A
-import org.jetbrains.annotations.NotNull;%0Aimport org.jetbrains.annotations.Nullable;%0A%0A
 impo
@@ -200,16 +200,101 @@
 ository;
+%0Aimport org.jetbrains.annotations.NotNull;%0Aimport org.jetbrains.annotations.Nullable;
 %0A%0A/**%0A *
@@ -3592,10 +3592,1281 @@
 eners);%0A
+%0A    // Bugfix%0A%0A    GitCommandResult startBugfix(@NotNull GitRepository repository,%0A                                  @NotNull String bugfixName,%0A                                  @Nullable String baseBranch,%0A                                  @Nullable GitLineHandlerListener... listeners);%0A%0A    GitCommandResult finishBugfix(@NotNull GitRepository repository,%0A                                   @NotNull String bugfixName,%0A                                   @Nullable GitLineHandlerListener... listeners);%0A%0A    GitCommandResult publishBugfix(@NotNull GitRepository repository,%0A                                    @NotNull String bugfixName,%0A                                    @Nullable GitLineHandlerListener... listeners);%0A%0A    GitCommandResult pullBugfix(@NotNull GitRepository repository,%0A                                 @NotNull String bugfixName,%0A                                 @NotNull GitRemote remote,%0A                                 @Nullable GitLineHandlerListener... listeners);%0A%0A    GitCommandResult trackBugfix(@NotNull GitRepository repository,%0A                                  @NotNull String bugfixName,%0A                                  @NotNull GitRemote remote,%0A                                  @Nullable GitLineHandlerListener... listeners);%0A%0A
 %7D%0A

Add bugfix interface methods