progit / progit2

Pro Git 2nd Edition
Other
5.91k stars 1.94k forks source link

Small Corrections to 'The Smart Protocol/Downloading Data/SSH' Section #1921

Open mobsceneZ opened 10 months ago

mobsceneZ commented 10 months ago

There's no existing/similar bug report.

This report is about a single actionable bug.

This report is about the ProGit book, version 2, English language.

Bug covers book website/pdf

Problem is present in the Pro Git book on the website?

Which version of the book is affected?

Source files

Describe the bug:

In Git Internals/Transfer Protocols/The Smart Protocol/Downloading Data/SSH section, ProGit2 claims the first response from server side looks something like this:

00dfca82a6dff817ec66f44342007202690a93763949 HEAD□multi_ack thin-pack \
    side-band side-band-64k ofs-delta shallow no-progress include-tag \
    multi_ack_detailed symref=HEAD:refs/heads/master \
    agent=git/2:2.1.1+github-607-gfba4028
003fe2409a098dc3e53539a9028a94b6224db9d6a6b6 refs/heads/master
0000

For me, the refs/heads/master's SHA-1 value looks strange, since HEAD now symbolically links to refs/heads/master, the listed SHA-1 should be same. To confirm this, I manually cloned the simplegit-progit repository and tried following commands:

$ git cat-file -p e2409a098dc3e53539a9028a94b6224db9d6a6b6
fatal: Not a valid object name e2409a098dc3e53539a9028a94b6224db9d6a6b6

The object that corresponds to this SHA-1 value doesn't even exist. Therefore, I think the SHA-1 value of refs/heads/master should be corrected.

Steps to reproduce:

  1. Please refer to book/10-git-internals/sections/transfer-protocols.asc

Expected behavior:

The SHA-1 value of refs/heads/master should be ca82a6dff817ec66f44342007202690a93763949.

Screenshots:

No response

Additional context:

No response

Device

No response

Operating system

No response

Browser/application + version

No response