title: Is "git log --pretty=<pretty format>" a porcelain or plumbing command?
body: <p>I am creating some scripts and programs that fetch commit information using</p>
  
  <pre><code>git log --pretty=&lt;my format&gt; -1 &lt;commit&gt;
  </code></pre>
  
  <p>I wonder if the output of this command is suitable to be parsed by programs (plumbing) or only meant to be presented to humans (porcelain). For example, in some projects I am fetching commit SHA + author name + commit summary with this:</p>
  
  <pre><code>git log --pretty="%H%n%an%n%s" -1 HEAD
  </code></pre>
  
  <p>And then I split the output string by the newline character (I'm on Linux).</p>
  
  <p>Besides, in some cases I also do something like this:</p>
  
  <pre><code>git log --pretty='[%h] %an: %s' -1 HEAD
  </code></pre>
  
  <p>And then parse the result with the following regex, expecting that a short SHA, the author name and the commit summary are in the captured groups:</p>
  
  <pre><code>^\[(\w+)\] ([^:]+): (.*)$
  </code></pre>
  
  <p>Is it a good approach? If not, what is the preferred way to programmatically get information about commits?</p>