I am trying to get data from git using a single command, as making multiple calls to git seems to be extremely slow. I want basic data from a commit, the hash, the author, the date, message, etc... The problem is with messages and the fact they can contain anything. They can contain the symbols I am using a delimiter between the fields. I also want to retain the new lines from the commit messages.
git log --pretty=format:%H,%an,%ae,%aD,%B:
So I would parse the output and simply split by ':' to get information for each commit and split by ',' to get each entry's information. The problem now is if the commit message has a comma or a colon then it'll change and corrupt the result.
Is there any way to sanitise output of %B
or do I just have to use delimiters that no one will (hopefully) ever use or guess?