path: root/Documentation/git-read-tree.txt
diff options
authorJunio C Hamano <>2005-11-15 09:31:04 (GMT)
committerJunio C Hamano <>2005-11-15 09:31:04 (GMT)
commitcd0a781c386b197e63a30104bead39420eada7ca (patch)
tree8ea8ba4b812ca2bc384ccc117da7fd4f4516f000 /Documentation/git-read-tree.txt
parent313c4714c5ec1673805b952ba79d910a42e8937c (diff)
Documentation: do not blindly run 'cat' .git/HEAD, or echo into it.
Many places in the documentation we still talked about reading what commit is recorded in .git/HEAD or writing the new head information into it, both assuming .git/HEAD is a symlink. That is not necessarily so. Signed-off-by: Junio C Hamano <>
Diffstat (limited to 'Documentation/git-read-tree.txt')
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/git-read-tree.txt b/Documentation/git-read-tree.txt
index 7be0cbd..8b91847 100644
--- a/Documentation/git-read-tree.txt
+++ b/Documentation/git-read-tree.txt
@@ -237,7 +237,7 @@ This is done to prevent you from losing your work-in-progress
changes. To illustrate, suppose you start from what has been
commited last to your repository:
- $ JC=`cat .git/HEAD`
+ $ JC=`git-rev-parse --verify "HEAD^0"`
$ git-checkout-index -f -u -a $JC
You do random edits, without running git-update-index. And then