瀏覽代碼

tutorial: Fix ref reading.

Jelmer Vernooij 14 年之前
父節點
當前提交
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