currentCommit function
Get the current commit hash.
Implementation
Future<String?> currentCommit({String? dir, bool short = false}) async {
final result = await runGit([
'rev-parse',
if (short) '--short',
'HEAD',
], workingDirectory: dir);
return result.success ? result.output : null;
}