Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support clients that don't enable side-band or side-band-64k #41

Merged
merged 8 commits into from
Apr 6, 2023

Commits on Apr 6, 2023

  1. Configuration menu
    Copy the full SHA
    4cc80f2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9e788b5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3d157b5 View commit details
    Browse the repository at this point in the history
  4. Add a test that demonstrates a protocol error

    When the client doesn't request sideband information, the report should
    be sent directly, not in a sideband message, and there should be no
    other sideband messages (i.e. from index-pack).
    spraints committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    eaf8daf View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    eff59d6 View commit details
    Browse the repository at this point in the history
  6. When sideband is off, send the report directly

    Most git clients enable the side-band or side-band-64k capability. When
    they do this, the report ("unpack ok" and per-ref status) will be sent
    nested in a sideband 1 packet. However, git clients aren't required to
    do this, and when they don't the report is supposed to be written
    without getting nested. So that's what this change does.
    spraints committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    1488c82 View commit details
    Browse the repository at this point in the history
  7. Use a file for the empty pack

    The empty pack is the same for all of these tests, so we can generate it
    once, store it in the repo, and avoid the complexity of shelling out to
    git during the tests.
    
    Here's how I generated the file:
    
      $ git pack-objects --revs --stdout > internal/integration/testdata/empty.pack </dev/null
      Total 0 (delta 0), reused 0 (delta 0), pack-reused 0
    spraints committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    2e77fa7 View commit details
    Browse the repository at this point in the history
  8. Don't fail is there was some data

    When reading the output from spokes-receive-pack, sometimes we get "file
    already closed" instead of EOF at the end of the output. In that case,
    when there is some data, just log the error and proceed to parsing the
    data.
    
    This is an attempt to fix or at least learn more about errors like the
    one in https://github.com/github/spokes-receive-pack/actions/runs/4629813916/jobs/8190557968.
    spraints committed Apr 6, 2023
    Configuration menu
    Copy the full SHA
    1c65fc2 View commit details
    Browse the repository at this point in the history