I want to create a little Git GUI and my idea is to make a program that calls the normal git software (using exec or something similar), but my problem is that I don't know what to do with the stdout (output) of git. It prints everything as a string.
Is there a way to make it print some kind of data that can be easily parsed, such as a JSON or something?
How are GUIs like git-gui for Windows or Gitkraken getting the output?
If you know another program that works like that, then please tell me the approach I can use.
git <command> --porcelainto get more machine-readable output. For example, If you rangit statuson a repo with no changes, you would get some unnecessary info, like a prompt to push for example. But if you rangit status --porcelain, there would be zero output