File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -124,8 +124,8 @@ This tree contains three ``Blob`` objects and one ``Tree`` object. The trees
124
124
are subdirectories and the blobs are files. Trees below the root have
125
125
additional attributes.
126
126
127
- >>> contents = tree.contents[-2 ]
128
- <GitPython.Tree "e5445b9db4a9f08d5b4de4e29e61dffda2f386ba ">
127
+ >>> contents = tree["lib" ]
128
+ <GitPython.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a3 ">
129
129
130
130
>>> contents.name
131
131
'test'
@@ -134,7 +134,8 @@ additional attributes.
134
134
'040000'
135
135
136
136
There is a convenience method that allows you to get a named sub-object
137
- from a tree.
137
+ from a tree with a syntax similar to how paths are written in an unix
138
+ system.
138
139
139
140
>>> tree/"lib"
140
141
<GitPython.Tree "c1c7214dde86f76bc3e18806ac1f47c38b2b7a30">
You can’t perform that action at this time.
0 commit comments