We try to keep our books accurate, but sometimes mistakes creep
in. This page lists the errors submitted by our astute readers.
If you've found a new error, please
submit it.
The latest version of the book is P2.0,
released over 2 years ago.
If you've bought a PDF of the book and would like to upgrade
it to this version (for free), visit your
home page.
| PDF |
Paper |
Description |
Found in |
Fixed in |
| 1 |
|
#40248: Code files (both .tgz and .zip) are empty. If there is no code, no code files should be offered for download.
|
P2.0
28-Jul-09
|
|
| 29 |
|
#43346: Cygwin is not a Linux emulator for Windows. Cygwin is a collection of tools compiled on Windows using a shim library that provides POSIX functionality missing in Windows. Perhaps best to say something like, "Cygwin makes it possible to recompile tools intended for distribution to Unix systems so the tools can run under Windows".--Seth Arnold #43346: Cygwin is not a Linux emulator for Windows. Cygwin is a collection of tools compiled on Windows using a shim library that provides POSIX funct ...more...
|
P2.0
20-May-10
|
|
| 39 |
|
#43347: Giving "chances of collision" for SHA-1 without further discussion is misleading in several dimensions.
SHA-1 encodes any data up to 2^64 - 1 bits in length into a hash only 160 bits long. So, clearly there are trillions upon trillions of collisions. (Roughly 2^(2^64) possible inputs; 2^160 possible outputs. Pigeon Hole Principle means there's going to be overlap in the outputs.)
Actually _finding_ collisions is another matter. If SHA-1 were perfect, reaching a 50% chance that there is a collision in a 'random' set of inputs to SHA-1 should require a set roughly 2^80 in size, by the 'birthday paradox'. That's for a 50% chance of any collision, not a specific collision, which would of course be lower.
But SHA-1 isn't perfect; I found an article in Eurocrypt 2009 mentioning 2^52 complexity work for finding collisions. (Which is one reason why SHA-1 is being phased out in favor of SHA-2. 2^52 work is cheaper than brute-force searching DES keys, and much cheaper than the 2^80 work that one would expect from a perfect 160 bit output function.)--Seth Arnold #43347: Giving "chances of collision" for SHA-1 without further discussion is misleading in several dimensions.
SHA-1 encodes any data up to 2^64 - ...more...
|
P2.0
20-May-10
|
|
| 39 |
|
#39672: In discussing the probability of getting duplicate SHA1 hashes, the exponent should not be 63 but 160 (the hash is made up of 40 hex digits, each equivalent to 4 bits). Thus the probability diminishes from the quoted 1 in 9,223,372,036,854,775,808 to an absurdly small 1 in 1,461,501,637,330,902,918,203,684,832,716,283,019,655,932,542,976. A small detail, but ugly to the eye when reading... --Àlvar Vinacua #39672: In discussing the probability of getting duplicate SHA1 hashes, the exponent should not be 63 but 160 (the hash is made up of 40 hex digits, e ...more...
|
P2.0
26-Jun-09
|
|
| 41 |
|
#43348: The problem is in the epub format; a line break in the PDF version ("why you made your change, and you/are set:") turns into "why you made your change, and youare set:" in the epub.
This problem also occurs at the phrases "switch for readability" and "Staged changes are simply" later in the book.--Seth Arnold #43348: The problem is in the epub format; a line break in the PDF version ("why you made your change, and you/are set:") turns into "why you made you ...more...
|
P2.0
20-May-10
|
|
| 43 |
|
#44227: This is clearly an error I get the following
$ git commit -a
Aborting commit due to empty commit message.
the book shows the output as
prompt> git commit -a
... editor launch, create log message, save, and exit ...
Created commit e993d25: add in a bio link
1 files changed, 3 insertions(+), 0 deletions(-)
which shows a commit message of "add in a bio link" that is missing from the command "git commit -a"
--Ron Bingham #44227: This is clearly an error I get the following
$ git commit -a
Aborting commit due to empty commit message.
the book shows the output as
...more...
|
P2.0
22-Jul-10
|
|
| 45 |
|
#39566: You describe the process of tagging a release and cleaning up your repository by rebasing master on top of your release branch and deleting the branch. Most of your readers will be working with other developers, pushing to a common repository, not working entirely in their own local repository. As a result, rebasing master on a release branch is not a good idea, as far as I understand anyway. I think this more realistic scenario should be the basis for the example.--Moses Hohman #39566: You describe the process of tagging a release and cleaning up your repository by rebasing master on top of your release branch and deleting th ...more...
|
P2.0
19-Jun-09
|
|
| 45 |
|
#46043: The text says the "<meta> description" change that was added to the RB 1.0 branch needs to be added to the master branch too (by using git rebase), but then the git rebase command shows the "bio link" change added instead. The order of commits in figure 3.2 also implies the "bio link" has just been added (to some unspecified branch). This makes it confusing about what git rebase actually does... does it merge changes from the branch listed on the command line into the currently checked out branch, or does it merge changes from the currently checked out branch into the branch listed on the command line? The text says the git rebase command takes as a parameter the name of the branch you want to rebase against, but the phrase "rebase against" is undefined.
Figures 3.1 and 3.2 would be clearer if the master and rb 1.0 branches were labeled.
Figure 3.2 is ambiguous; either the "<meta> description" change has been inserted into some branch (master?) ahead of the "bio link" change, or the "bio link" change has been appended to some branch (rb 1.0?). If the change was inserted instead of appended, it would help to explain why git rebase inserted it instead of appending it.
Also, it would help on page 43 to say whether or not the git branch command causes the new branch it creates to become the currently checked out branch.--Steve Eppley #46043: The text says the "<meta> description" change that was added to the RB 1.0 branch needs to be added to the master branch too (by using git reb ...more...
|
P2.0
17-Dec-10
|
|
| 45 |
|
#40163: Regarding this statement : "Right now your repository looks like Figure 3.1. After rebasing, it looks like Figure 3.2, on the following page."
This make it look as if rebasing removes the RB_1.0 branch. Suggest either including the RB_1.0 branch in the second diagram, or changing the text to "Right now
your repository looks like Figure 3.1. After rebasing, the master branch looks like Figure 3.2, on the following page."
--Mike Depot #40163: Regarding this statement : "Right now your repository looks like Figure 3.1. After rebasing, it looks like Figure 3.2, on the following page." ...more...
|
P2.0
24-Jul-09
|
|
| 46 |
|
#41009: I believe you are referring to the master branch and not RB_1.0:
"A quick check of git log shows that you have only the three commits
that were in your RB_1.0 branch:
prompt> git log --pretty=oneline
4b53779 Add in a description element to the metadata
a5dacab add <head> and <title> to index
7b1558c add in hello world HTML"--Jeff Enderwick #41009: I believe you are referring to the master branch and not RB_1.0:
"A quick check of git log shows that you have only the three commits
that ...more...
|
P2.0
19-Oct-09
|
|
| 56 |
|
#41010: The file systems don't ignore; the view application (e.g. ls) does!
"You can name the file anything you want, but most people
start the file’s name with a period (.) because most file systems
ignore files that begin with a period."--Jeff Enderwick #41010: The file systems don't ignore; the view application (e.g. ls) does!
"You can name the file anything you want, but most people
start the fi ...more...
|
P2.0
19-Oct-09
|
|
|
64 |
#39912: In the commit message Javascript should be referred to as JavaScript--Brian McKinney
|
P2.0
09-Jul-09
|
|
|
65 |
#39913: In the commit message, EMCAScript should be referred to as ECMAScript--Brian McKinney
|
P2.0
09-Jul-09
|
|
|
74 |
#43091: In the second to last paragraph, the last sentence says "... every commit after 18f822e to 5ef8." I believe the 5ef8 should be 0bb3dfb.--John Szakmeister
|
P2.0
05-May-10
|
|
| 75 |
|
#39254: first code example (second line)
EMCAScript should be ECMAScript--Stephan Schmitt
|
P1.0
27-May-09
|
|
| 78 |
|
#43349: When git branch -d or git branch -D deletes a branch, is the branch gone forever? Later in the book, I see branches retrieved using tags that were set inside the branch; does this matter if -d vs -D was used? What does it really mean to 'delete' a branch if you can get it back? What are the consequences of deleting branches that others use as 'remote' branches?--Seth Arnold #43349: When git branch -d or git branch -D deletes a branch, is the branch gone forever? Later in the book, I see branches retrieved using tags that ...more...
|
P2.0
20-May-10
|
|
| 83 |
|
#39172: The second short commit name in the example "git log 18f822e..0bb3dfb" does not match the range described in the explanatory text: "Instead, Git interprets that range to mean every commit after 18f822e to 5ef8."
--Gregory Foster #39172: The second short commit name in the example "git log 18f822e..0bb3dfb" does not match the range described in the explanatory text: "Instead, G ...more...
|
P1.0
10-May-09
|
|
| 83 |
|
#46036: In the paragraph after the "git log 18f822e..0bb3dfb" example there is an error in the last line. In the text "Git interprets that range to mean every commit after 18f822e to 5ef8" the "5ef8" should be "0bb3".--Brian Kidney #46036: In the paragraph after the "git log 18f822e..0bb3dfb" example there is an error in the last line. In the text "Git interprets that range to m ...more...
|
P2.0
16-Dec-10
|
|
| 84 |
|
#43350: "if it as a caret in it." Should be "if it has a caret in it."--Seth Arnold
|
P2.0
20-May-10
|
|
| 84 |
|
#38818: At the end of the page, when you talk about the caret (^). Although what it says is correct, it's not complete.
The most important use of the caret operator is in the form ^# (where # is a number) in order to identify a parent when there's more than one.
For example when you've finnished merging 2 branches, you can checkout HEAD^ and going to the last commit in one branch (usually the current), and checking out HEAD^2 goes to the last commit in the other branch.
The examples in the start of page 85 are nonsense... Why anyone needs to do git log HEAD~1^^ ? I think it's not much pragmatic when you can just do git log HEAD~3
Anyway, combining them is useful in a situation as the next one: Imagine you have the next history:
-- X -- X -- X -- A -- X -- X -- HEAD
-- X -- X -- X -- B --´
If you want to checkout the commit "A" you have to do: git checkout HEAD~2^
In the other hand, if you want to checkout the commit "B" you have to do: git checkout HEAD~2^2
I think it's important to point that.--Albert Oliver #38818: At the end of the page, when you talk about the caret (^). Although what it says is correct, it's not complete.
The most important use of t ...more...
|
P1.0
10-Apr-09
|
|
| 85 |
|
#40536: On page 85, fourth line:
"The following three commands would all grab the same revision" should be "The following four commands -"
There are actually four commands below it.--Sung Ahn Kim #40536: On page 85, fourth line:
"The following three commands would all grab the same revision" should be "The following four commands -"
There ...more...
|
P2.0
21-Aug-09
|
|
| 87 |
|
#40857: "Next, notice that the filename index.html is listed. Remember when you
created this file? It was originally named index.html. "
should be hello.html and index.html, not index.html twice.--Daniel Roussel #40857: "Next, notice that the filename index.html is listed. Remember when you
created this file? It was originally named index.html. "
should be ...more...
|
P2.0
24-Sep-09
|
|
|
92 |
#38671: The URL for SSH in figure 7.1, at the top of the page, is incorrect, as it omits the protocol. It should be:
ssh://git@github....--Charles Curley
|
P1.0
01-Apr-09
|
|
|
92 |
#40756: Figure 7.1 should be: git@github.com:tswicegood/mysite-chp6.git--downtown_dave
|
P1.0
16-Sep-09
|
|
| 94 |
85 |
#40827: You never use '~#' except this one. '~#' shoud be '~N'.--Sung Ahn Kim
|
P2.0
21-Sep-09
|
|
| 94 |
|
#42112: 'git reset' with neither --soft or --hard leaves the changes in the working tree. I think the fourth paragraph would be clearer if it read something like "git reset updates the repository and _leaves_ the changes in your working tree..."
Also, 'git reset HEAD' seems to be a noop for me. 'git reset HEAD^' seems to reset the previous commit. I think the sentence 'HEAD^ would reset two commits...' (in the third paragraph) isn't correct.
--Kevin McCarthy #42112: 'git reset' with neither --soft or --hard leaves the changes in the working tree. I think the fourth paragraph would be clearer if it read so ...more...
|
P2.0
19-Jan-10
|
|
| 97 |
88 |
#40853: Missing '#' for comments.
This is a combination of two commits.
# The first commit's message is:
should be
# This is a combination of two commits.
# The first commit's message is:--Sung Ahn Kim #40853: Missing '#' for comments.
This is a combination of two commits.
# The first commit's message is:
should be
# This is a combination o ...more...
|
P1.0
23-Sep-09
|
|
|
98 |
#45441: On page 98, the sidebar "Adding a Remote Repository Later" is incomplete... well, ok, wrong. At least, it doesn't work for me.
Here is a (genericized) sequence that DOES work for me:
ssh git@example.com
mkdir pocus.git
cd pocus.git
git init --bare
exit
# Now, assuming I'm already in my existing local repository:
git remote add origin git@example.com:pocus.git
git push origin master--Charles Roth #45441: On page 98, the sidebar "Adding a Remote Repository Later" is incomplete... well, ok, wrong. At least, it doesn't work for me.
Here is a ( ...more...
|
P2.0
26-Oct-10
|
|
| 102 |
|
#40144: GitHub actually does support HTTP now, although it is extremely slow--Darrin
|
P2.0
22-Jul-09
|
|
|
103 |
#38706: At the very bottom of page 103, the example at the very bottom should be:
git checkout -b another-from-1.0 1.0
The trailing tag name has been omitted.
The example is supposed to show how to create a new branch from a tag, but instead it shows how to create a new branch from the current commit and is identical to the command right above it, and the "another way" ends up being identical to the first.--Anthony Foglia #38706: At the very bottom of page 103, the example at the very bottom should be:
git checkout -b another-from-1.0 1.0
The trailing tag name has bee ...more...
|
P1.0
03-Apr-09
|
|
| 108 |
|
#43351: Even after the discussion of remote repository handling, I'm left confused. I've seen discussion of remote/ branches in the local repository, and I haven't got a clue how one would use the branches in daily use.
Furthermore, I'm not entirely sure what would happen if two developers each start their own git repos by unpacking the same tarball... or perhaps unpacking the same tarball into different directories in their repos. How does sharing changes work between them after they've been added as new remote repos? (Or, must repositories share a common ancestor in order to be shared via git remote?)--Seth Arnold #43351: Even after the discussion of remote repository handling, I'm left confused. I've seen discussion of remote/ branches in the local repository, ...more...
|
P2.0
20-May-10
|
|
| 111 |
|
#39914: The command "git tag contacts/1.1 contacts" fails with the error "fatal: Failed to resolve 'contacts' as a valid ref.' since the contacts branch is not being tracked locally. There appear to be two solutions:
1) Use the command "git tag contacts/1.1 origin/contacts" to create the tag contacts/1.1 from the remote branch origin/contacts, or
2) First locally track the remote contacts branch using the command "git checkout --track -b contacts origin/contacts" and then issue the command "git tag contacts/1.1 contacts" to create a tag from the latest commit in the local contacts branch.
I'm not sure of the differences or advantages/disadvantages between the two solutions (if any).
Note, I cloned the repository with the following command: git clone git://github.com/tswicegood/mysite-chp7.git ~/development/git/mysite-chp7.github.tswicegood
--Matthew Rankin #39914: The command "git tag contacts/1.1 contacts" fails with the error "fatal: Failed to resolve 'contacts' as a valid ref.' since the contacts bran ...more...
|
P2.0
10-Jul-09
|
|
| 120 |
|
#39107: # (use "git add <file>..." to update what will be committed)
#
# modified: hocus
#
no changes added to commit (use "git add" and/or "git commit -a")
last line should be
# no changes added to commit (use "git add" and/or "git commit -a")
--Sava Chankov #39107: # (use "git add <file>..." to update what will be committed)
#
# modified: hocus
#
no changes added to commit (use "git add" and/or "g ...more...
|
P1.0
05-May-09
|
|
| 121 |
|
#43352: "Make sure you don't include a trailing slash with calling git add." Should be "slash when calling git add."--Seth Arnold
|
P2.0
20-May-10
|
|
|
127 |
#40500: Fourth paragraph:
"This brings us to the end of the basics chapter"
should be:
"This brings us to the end of the beyond the basics chapter"
Maybe "the end of this chapter" would flow better?
Hmm, my version date is not listed: P1.0 printing November 2008
Version: 2008-11-18--Hugh Sasse #40500: Fourth paragraph:
"This brings us to the end of the basics chapter"
should be:
"This brings us to the end of the beyond the basics chapter" ...more...
|
P1.0
20-Aug-09
|
|
|
135 |
#39305: As mentioned by Steven near the bottom of "Macports install fails", sometimes git-svn --version returns errors even if installed if you do it outside of a repository.--Andrew Grimm #39305: As mentioned by Steven near the bottom of "Macports install fails", sometimes git-svn --version returns errors even if installed if you do it ...more...
|
P1.0
02-Jun-09
|
|
|
136 |
#38708: Replace "some partially completely algorithm change" with "some partially complete algorithm change".--Anthony Foglia
|
P1.0
03-Apr-09
|
|
| 141 |
|
#43354: "use the git svn clone command to Just like its" is missing the second half of a sentence and a period.--Seth Arnold
|
P2.0
20-May-10
|
|
| 141 |
|
#42098: In the grey box, in the fourth paragraph, in the third sentence, the word "completely" should be "complete".--Barry Simpson
|
P2.0
18-Jan-10
|
|
| 142 |
|
#43353: "Beware of CPAN on Mac" sidebar: You've described every single CPAN experience I've ever had, on at least four different Linux distributions. My strong advice is to always get Perl things from your Linux distribution repositories if at all possible. (I want to know why the first thing it always wants to do is build a completely new Perl from scratch. No.)
I think "Beware of CPAN" would be a better title. :)--Seth Arnold #43353: "Beware of CPAN on Mac" sidebar: You've described every single CPAN experience I've ever had, on at least four different Linux distributions. ...more...
|
P2.0
20-May-10
|
|
| 150 |
|
#39280: Not really the linux admin, but as far as I could infer from the manpages, the adduser command on page 150 is not right.
In the text, there is stated, that user and group will be created, which was not the case. When I used --group option, only group was created.
Adding group `git' (1002)...
Done.
Obvoiusly I could not than proceed with other commands, because the user didn't exist.Omitting the --group option did the trick for me
Adding user `git'...
Adding new group `git' (1002).
Adding new user `git' (1002) with group `git'.
Creating home directory `/srv/example.com/git'.
Copying files from `/etc/skel'
Changing the user information for git
HTH--Tomáš Svárovský #39280: Not really the linux admin, but as far as I could infer from the manpages, the adduser command on page 150 is not right.
In the text, there ...more...
|
P2.0
30-May-09
|
|
| 151 |
|
#47811: I have found that the post-update hook is not (necessarily) executable by default on a few installations both using the python install method and apt-get. #47811: I have found that the post-update hook is not (necessarily) executable by default on a few installations both using the python install method ...more...
|
P2.0
24-Oct-11
|
|
| 152 |
148 |
#40852: "keydir directory" should be "keydir/ directory"
You have always put ending slash for directories.--Sung Ahn Kim
|
P1.0
23-Sep-09
|
|
| 154 |
|
#43355: "you need to edit the gitosis.conf name from earlier". Suggest removing 'the' and 'name'. (You're surely not editing the name. :)--Seth Arnold
|
P2.0
20-May-10
|
|
| 155 |
|
#43356: You're using sudo to run the git daemon as user git to serve up a repository owned by user git. What prevents the daemon from modifying the repository? Or, what keeps it 'read-only'? Is it just that the git daemon tries hard to not write, and we're all hoping that there are no bugs that allow it to write? Or should the git daemon be running as some other user, one with only read access to the repository?--Seth Arnold #43356: You're using sudo to run the git daemon as user git to serve up a repository owned by user git. What prevents the daemon from modifying the re ...more...
|
P2.0
20-May-10
|
|
| 155 |
|
#43357: "The final & suffix detaches it from the current session, and the nohup prefix detaches it from the current user."
& creates a new process group and places the process group in the background. (setpgid(2) in the child, ioctl(tty,TIOCSPGRP,$$) in the parent.) The process is still in the current session.
nohup sets the signal disposition of the child process to ignore SIGHUP. The terminal will send SIGHUP to its controlling process, usually the shell, and the shell will send SIGHUP to all jobs before exiting. nohup instructs the child to ignore SIGHUP. (This is different from e.g. bash's disown command, which asks bash to not send the SIGHUP signal to that specific job.) The default disposition of SIGHUP is to terminate the process, so ignoring SIGHUP allows the process to continue running. But the process still retains all the credentials of the user running the process.
In neither case are child processes "detached from the current session" (that would require calling setsid(1), which calls setsid(2)) or the child process "detached from the user" (which requires CAP_SETGID and CAP_SETUID, and then calling setuid(2), setguid(2), setgroups(2), setreuid(2), setresuid(2), or setfsuid(2), and perhaps other syscalls.)--Seth Arnold #43357: "The final & suffix detaches it from the current session, and the nohup prefix detaches it from the current user."
& creates a new process ...more...
|
P2.0
20-May-10
|
|
| 160 |
|
#43358: Please also include 'recipes' for reverting a previous commit in history, reverting a range of previous commits in history, and reverting (one,many) previous commits for a specific file.--Seth Arnold #43358: Please also include 'recipes' for reverting a previous commit in history, reverting a range of previous commits in history, and reverting (one ...more...
|
P2.0
20-May-10
|
|
| 161 |
161 |
#39361: Under "Move or Rename a Branch", the commands for renaming a branch use "git checkout" with a "-m" or "-M" flag. They should use "git branch" with the same flags.
git checkout does take a "-m" flag, but it invokes a merge.--Tim Holahan #39361: Under "Move or Rename a Branch", the commands for renaming a branch use "git checkout" with a "-m" or "-M" flag. They should use "git branch" ...more...
|
P2.0
08-Jun-09
|
|
| 174 |
|
#43359: Problem is only in epub format. The TextMate entry looks like this:
[TPEFTM]
TextMate: Power Editing for the Mac, James Edward {Gray II, 2007.
The PDF version looks like this:
[Gra07] James Edward Gray II. TextMate: Power Editing for the Mac. The Pragmatic Programmers, LLC, Raleigh, NC, and Dallas, TX, 2007.
--Seth Arnold #43359: Problem is only in epub format. The TextMate entry looks like this:
[TPEFTM]
TextMate: Power Editing for the Mac, James Edward {Gray II, 2 ...more...
|
P2.0
20-May-10
|
|