package tasks.mine;

import io.Reader;
import io.Writer;
import main.Config;
import tasks.mine.queries.CommitsQuery;

/**
 * Queries commits statistics
 * 
 * @author Lisa Nguyen Quang Do
 */

public class Commits {

	public void run(String target) {
		Writer writer = new Writer(Config.resultFile, target);
		Reader reader = new Reader(Config.resultFile, target);

		CommitsQuery commitsQuery = new CommitsQuery(writer, reader);
		if (commitsQuery.queryCommits())
			System.out.println("Commits finished");
		else
			System.out.println("Commits failed");
	}
}
