static void execGitCmd(File gitRepoDir, Consumer<String> outputConsumer, String... args)
			throws IOException {
		outputConsumer = Dummy.ifNull(outputConsumer);
		List<String> cmdArgs = new ArrayList<>(List.of("git", "-C", gitRepoDir.getPath()));
		cmdArgs.addAll(List.of(args));

		Process gitCmdProcess = new ProcessBuilder(cmdArgs) // git -C repodir blahblah
				.redirectError(Redirect.DISCARD)
				.start();
		BufferedReader inputReader = gitCmdProcess.inputReader();

		String line;
		while ((line = inputReader.readLine()) != null) {
			outputConsumer.accept(line);
		}

		try {
			int exitValue = gitCmdProcess.waitFor();
			if (exitValue != 0) {
				throw new IOException("Git error: %d [%s]".formatted(exitValue, cmdArgs));
			}
		}
		catch (InterruptedException e) {
			throw new IOException(e);
		}
	}
Executes a git command.

@param gitRepoDir path to a git repo
@param outputConsumer optional string consumer
@param args git args
@throws IOException if failure
Ghidra/Features/Base/src/test/java/ghidra/app/util/bin/format/golang/rtti/GoApiSnapshotGeneratorTest.java