Re: Need help grasping some concepts
From: <hidden>
Date: 2016-06-15 22:50:34
On Tue, 15 Feb 2011, Jo?o P. Sampaio wrote:
I've been reading this list for quite a while now, and trying to understand what's going on, and wandering around in the code. There are some concepts I'd like you to help me understand better: 1) What are plumbing and porcelain functions, methods, APIs... What's the meaning of that classification and difference between the two?
'plumbing' is the very low-level functionality, 'porcelain' makes use of the plumbing to get the job done in a user friendly way. this is not a hard and fast separation, it is a set of terminology that grew because the initial git commands would do the jobe, but were ugly (and in some cases dangerous) to use. people wrote wrapper scripts that did sanity checking, offered good defaults, error messages meaningful to normal humans (as opposed to git developers), etc. There became a need to differentiate between the large population of wrappers and the underlying commands that they called. using a bathroom analogy, the core commands are the plumbing (it's there, but normally only experts understand it's care and feeding), and the things users are expected to use (the pretty, smooth fixtures that would be worthless without the plumbing under them)
2) What's going on about cache-tree not being able to handle empty trees, or something like that? You mean Git doesn't store empty directories in repositories?
git doesn't store directories at all. Git stores file contents and some metadata about the file (path, executable or not, but not ownership) As such, if there is no file to store, git doesn't have anything to store. so yes, an empty directory will not exist in a git repository (the workaround is to make a single, empty hidden file in that directory, typically something like .gitignore so that now there is a file to track)
3) And what are symbolic references? Are they just an alias I can attach to branches and tags, like symbolic links in Linux that I can attach to folders and files?
yep. David Lang