execute method
Future<void>
execute(
)
override
Implementation
@override
Future<void> execute() async {
State state = repository.state;
Branch? currentBranch = state.getCurrentBranch(
onNoStateFile: () => debugPrintToConsole(
message: "No state file found",
),
);
for (Branch b in repository.allBranches) {
bool isCurrentBranch = b.branchName == currentBranch?.branchName;
printToConsole(
message: "${b.branchName} ${isCurrentBranch ? "*" : ''} ${isCurrentBranch ? "-> ${state.stateInfo?.currentCommit}" : ''}",
style: isCurrentBranch ? null : CliStyle.bold,
color: isCurrentBranch ? CliColor.brightCyan : CliColor.white,
);
}
}