Skip to content

Commit 3e4ac0a

Browse files
committed
Make test.txt examples consistent
1 parent ecc5a3f commit 3e4ac0a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

book/10-git-internals/sections/objects.asc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,8 @@ image::images/data-model-1.png[Simple version of the Git data model.]
149149
You can fairly easily create your own tree.
150150
Git normally creates a tree by taking the state of your staging area or index and writing a series of tree objects from it.
151151
So, to create a tree object, you first have to set up an index by staging some files.
152-
To create an index with a single entry – the first version of your test.txt file – you can use the plumbing command `update-index`.
153-
You use this command to artificially add the earlier version of the test.txt file to a new staging area.
152+
To create an index with a single entry – the first version of your `test.txt` file – you can use the plumbing command `update-index`.
153+
You use this command to artificially add the earlier version of the `test.txt` file to a new staging area.
154154
You must pass it the `--add` option because the file doesn't yet exist in your staging area (you don't even have a staging area set up yet) and `--cacheinfo` because the file you're adding isn't in your directory but is in your database.
155155
Then, you specify the mode, SHA-1, and filename:
156156

@@ -183,7 +183,7 @@ $ git cat-file -t d8329fc1cc938780ffdd9f94e0d364e0ea74f579
183183
tree
184184
----
185185

186-
You'll now create a new tree with the second version of test.txt and a new file as well:
186+
You'll now create a new tree with the second version of `test.txt` and a new file as well:
187187

188188
[source,console]
189189
----
@@ -192,7 +192,7 @@ $ git update-index test.txt
192192
$ git update-index --add new.txt
193193
----
194194

195-
Your staging area now has the new version of test.txt as well as the new file new.txt.
195+
Your staging area now has the new version of `test.txt` as well as the new file new.txt.
196196
Write out that tree (recording the state of the staging area or index to a tree object) and see what it looks like:
197197

198198
[source,console]
@@ -204,7 +204,7 @@ $ git cat-file -p 0155eb4229851634a0f03eb265b69f5a2d56f341
204204
100644 blob 1f7a7a472abf3dd9643fd615f6da379c4acb3e3a test.txt
205205
----
206206

207-
Notice that this tree has both file entries and also that the test.txt SHA-1 is the ``version 2'' SHA-1 from earlier (`1f7a7a`).
207+
Notice that this tree has both file entries and also that the `test.txt` SHA-1 is the ``version 2'' SHA-1 from earlier (`1f7a7a`).
208208
Just for fun, you'll add the first tree as a subdirectory into this one.
209209
You can read trees into your staging area by calling `read-tree`.
210210
In this case, you can read an existing tree into your staging area as a subtree by using the `--prefix` option to `read-tree`:
@@ -220,7 +220,7 @@ $ git cat-file -p 3c4e9cd789d88d8d89c1073707c3585e41b0e614
220220
100644 blob 1f7a7a472abf3dd9643fd615f6da379c4acb3e3a test.txt
221221
----
222222

223-
If you created a working directory from the new tree you just wrote, you would get the two files in the top level of the working directory and a subdirectory named `bak` that contained the first version of the test.txt file.
223+
If you created a working directory from the new tree you just wrote, you would get the two files in the top level of the working directory and a subdirectory named `bak` that contained the first version of the `test.txt` file.
224224
You can think of the data that Git contains for these structures as being like this:
225225

226226
.The content structure of your current Git data.

0 commit comments

Comments
 (0)