The term "porcelain" appears occasionally in the Git documentation. What does it mean?
The term "porcelain" appears occasionally in the Git documentation. What does it mean?
--porcelain option!?If you want to:
....then you can add the --porcelain option and use the output for scripting.
Example: I may use git status --porcelain and use the output for scripting, no problem.
(I say this with the utmost respect to the creators of git. it is easy to criticize, especially if no alternative is specified. But to me, the flags seem confusing.)
There are two distinct meanings of porcelain in git.
These two meanings, while it can be argued are not strictly contradictory, can appear contradictory.
The official Pro Git book:
But because Git was initially a toolkit for a version control system rather than a full user-friendly VCS, it has a number of subcommands that do low-level work and were designed to be chained together UNIX-style or called from scripts. These commands are generally referred to as Git’s “plumbing” commands, while the more user-friendly commands are called “porcelain” commands.
--porcelain / =porcelain optionsMany git commands come with a --porcelain option which is meant for scripting.
git status' documentation:
--porcelain[=<version>]Give the output in an easy-to-parse format for scripts. This is similar to the short output, but will remain stable across Git versions and regardless of user configuration. See below for details.
git diff's documentation:
--word-diff[=<mode>]porcelain
Use a special line-based format intended for script consumption.