فهرست منبع

tutorial: Fix ref reading.

Jelmer Vernooij 15 سال پیش
والد
کامیت
a92f5be944
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      docs/tutorial/2-object-store.txt

+ 2 - 2
docs/tutorial/2-object-store.txt

@@ -70,14 +70,14 @@ are also moving HEAD, which is Git's currently checked out branch:
   >>> head = repo.refs['HEAD']
   >>> head = repo.refs['HEAD']
   >>> head == commit.id
   >>> head == commit.id
   True
   True
-  >>> head = repo.refs['refs/heads/master']
+  >>> head == repo.refs['refs/heads/master']
   True
   True
 
 
 How did that work? As it turns out, HEAD is a special kind of ref called a
 How did that work? As it turns out, HEAD is a special kind of ref called a
 symbolic ref, and it points at master. Most functions on the refs container
 symbolic ref, and it points at master. Most functions on the refs container
 work transparently with symbolic refs, but we can also take a peek inside HEAD:
 work transparently with symbolic refs, but we can also take a peek inside HEAD:
 
 
-  >>> repo.read_ref('HEAD')
+  >>> repo.refs.read_ref('HEAD')
   'ref: refs/heads/master'
   'ref: refs/heads/master'
 
 
 Normally, you won't need to use read_ref. If you want to change what ref HEAD
 Normally, you won't need to use read_ref. If you want to change what ref HEAD