De-emphasise the symbolic link documentation.
The fact that git has previously used symbolic links for representing symbolic refs doesn't seem relevant to the current function of git-symbolic-ref. This patch makes less of a big deal about the symbolic link history and instead focuses on what git does now. Signed-off-by: Andy Parkins <andyparkins@gmail.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Andy Parkins committed
Nov 30, 2006 at 10:50 UTC
22b1c7ee01ef5bc7f81e620bb88a6fad79c1c605
1 file changed
+11
-18
Documentation/git-symbolic-ref.txt
+11
-18
@@ -19,29 +19,22 @@ argument to see on which branch your working tree is on.
19
Give two arguments, create or update a symbolic ref <name> to
20
point at the given branch <ref>.
21
22
-Traditionally, `.git/HEAD` is a symlink pointing at
23
-`refs/heads/master`. When we want to switch to another branch,
24
-we did `ln -sf refs/heads/newbranch .git/HEAD`, and when we want
22
+A symbolic ref is a regular file that stores a string that
23
+begins with `ref: refs/`. For example, your `.git/HEAD` is
24
+a regular file whose contents is `ref: refs/heads/master`.
25
+
26
+NOTES
27
+-----
28
+In the past, `.git/HEAD` was a symbolic link pointing at
29
+`refs/heads/master`. When we wanted to switch to another branch,
30
+we did `ln -sf refs/heads/newbranch .git/HEAD`, and when we wanted
31
to find out which branch we are on, we did `readlink .git/HEAD`.
32
This was fine, and internally that is what still happens by
33
default, but on platforms that do not have working symlinks,
34
or that do not have the `readlink(1)` command, this was a bit
35
cumbersome. On some platforms, `ln -sf` does not even work as
30
-advertised (horrors).
31
-
32
-A symbolic ref can be a regular file that stores a string that
33
-begins with `ref: refs/`. For example, your `.git/HEAD` *can*
34
-be a regular file whose contents is `ref: refs/heads/master`.
35
-This can be used on a filesystem that does not support symbolic
36
-links. Instead of doing `readlink .git/HEAD`, `git-symbolic-ref
37
-HEAD` can be used to find out which branch we are on. To point
38
-the HEAD to `newbranch`, instead of `ln -sf refs/heads/newbranch
39
-.git/HEAD`, `git-symbolic-ref HEAD refs/heads/newbranch` can be
40
-used.
41
-
42
-Currently, .git/HEAD uses a regular file symbolic ref on Cygwin,
43
-and everywhere else it is implemented as a symlink. This can be
44
-changed at compilation time.
36
+advertised (horrors). Therefore symbolic links are now deprecated
37
+and symbolic refs are used by default.
38
39
Author
40
------