Skip to content

Commit f204ffb

Browse files
committed
answer questions
1 parent 8385cb0 commit f204ffb

2 files changed

Lines changed: 46 additions & 4 deletions

File tree

notes/2025-09-30.md

Lines changed: 42 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ So in broader context, the [git visual cheatsheet](https://ndpsoftware.com/git-c
163163
+++{"lesson_part": "main","type":"heading"}
164164

165165

166-
166+
(setsofcommands)=
167167
## Git has two sets of commands
168168

169169
- Porcelain: the user friendly VCS
@@ -191,13 +191,13 @@ a lot of programming is *designing* abstractions, to get good at making somethin
191191
+++{"lesson_part": "main"}
192192

193193

194-
We have so far used git as a version control system. A version control system, in general, will have operations like commit, push, pull, clone. These may work differently under the hood or be called different things, but those are what something needs to have in order to keep track of different versions.
194+
We have so far used git as a version control system, using the {term}`porcelain` commands. A version control system, in general, will have operations like commit, push, pull, clone. These may work differently under the hood or be called different things, but those are what something needs to have in order to keep track of different versions.
195195

196196

197197

198198
+++{"lesson_part": "main"}
199199

200-
The plumbing commands reveal the *way* that git performs version control operations. This means, they implement the git file system operations for the git version control system.
200+
The {term}`plumbing` commands reveal the *way* that git performs version control operations. This means, they implement the git file system operations for the git version control system.
201201

202202

203203
+++{"lesson_part": "main"}
@@ -1070,4 +1070,42 @@ Append the contents of one of your trees or commits and one blob or tree inside
10701070

10711071
That is, paste the result of you tracing through your own repo.
10721072

1073-
## Questions After Today's Class
1073+
## Questions After Today's Class
1074+
1075+
1076+
### How will we apply this information to the course?
1077+
1078+
Today we saw an example of how abstractions can work (or not quite work, since git is a leaky abstraction).
1079+
1080+
Seeing how git works *as* a file system also starts to build up your knowledge of what kinds of operations *any* file system needs to implement
1081+
1082+
### Is there a benefit to working with git at a lower level?
1083+
1084+
It is mostly helpful for understanding how git works so that you can understand how the more advanced features work, which can save you a lot of time.
1085+
1086+
We studied it primarily to see how *a* file system works.
1087+
1088+
It could, however, be useful if you were building a developer tool, or you wanted to contribute to git itself [see gitgitgadget for how](https://gitgitgadget.github.io/)
1089+
1090+
### Is it possible to check the oldest commit using cat .git/HEAD
1091+
1092+
You coudl trace backwards, like parsing through a linked list:
1093+
- first `cat .git/HEAD`
1094+
- then `cat` the file that tells you about
1095+
- then use `git cat-file -p` on the hash from the file above
1096+
- then use `git cat-file -p` hash of the parent commit
1097+
- repeat above until there is no parent commit.
1098+
1099+
1100+
### Can we configure Git to use a stronger hashing algorithm?
1101+
1102+
It looks like you can actually, from the [transition plan's detailed design](https://git-scm.com/docs/hash-function-transition#_detailed_design) that they have implemented it. However, it appears [github does not support that](https://github.com/orgs/community/discussions/12490), but [gitlab does at least partially](https://about.gitlab.com/blog/sha256-support-in-gitaly/)
1103+
1104+
::::::{attention}
1105+
this is a good topic for an explore badge.
1106+
::::::::
1107+
1108+
1109+
### If we are seeing a command for the first time, how do we know if it is porcelain or plumbing?
1110+
1111+
You can use the [definitions](setsofcommands) and what the command does.

resources/glossary.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,14 @@ parent
162162
path
163163
: the "location" of a file or folder(directory) in a computer
164164

165+
plumbing
166+
: (git command type) the internal workings- a toolkit for a VCS
165167

166168
pointer
167169
: a variable that stores the address of another variable
168170

171+
porcelain
172+
: (git command type) the user friendly VCS
169173

170174
pull (changes from a repository)
171175
: download changes from a remote repository and update the local repository with these changes.

0 commit comments

Comments
 (0)