Reputation: 5264
When someone commits, how the tree objects and blob objects are laid out for that commit ?
Suppose I have a tree structure like the following
.
|____dir1
| |____file_dir1
| |____newdir
| | |____file_newdir
|____dir2
| |____file_dir2
|____file1
|____file2
|____file3
According to this, it will create a blob for every file present in the tree structure. The link also tells that Apart from creating a blob it also creates a tree object.
Now the question arises whether a single tree object is created or multiple. Let's say multiple then Intuitively it may be creating 3 tree objects per commit for the above project structure as there are three directories in the project structure and each tree object will be pointing to each blob object(Note that each blob is corresponding to each file in the repository).
Now if each blob is corresponding to each file then why it is just not called as file ? why blob ?
blob
, why not just file as they store information about file.Upvotes: 0
Views: 171
Reputation: 34076
See also Git for Computer Scientists and the chapter 10 referenced in comments
Upvotes: 2