@rollingversions/git-protocol
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

@rollingversions/git-protocol

Low level streaming parsers & serializers for git protocol-v2 and git pack-protocol (see also: protocol-common).

Git terminology can be confusing. I have attempted to match the git internal names where possible, so it's easier to compare with the relevant part of the git docs. The most important thing to note is that everything is from the perspective of the server, not the client, so an "upload request" is a request sent from the client to the server that asks the server to "upload" data to the client. This is what is sent by "fetch" or "pull" commands

API

Capabilities

Capabilities are used to communicate the capabilities supported by either the server or the client. They are represented as a Map<string, string | boolean>.

parseInitialResponse

function parseInitialResponse(
  response: AsyncIterableIterator<Uint8Array>,
): Promise<Capabilities>;

Parse the response to calling GET https://example.com/example-repo.git/info/refs?service=git-upload-pack

Readme

Keywords

none

Package Sidebar

Install

npm i @rollingversions/git-protocol

Weekly Downloads

5

Version

2.1.0

License

MIT

Unpacked Size

243 kB

Total Files

32

Last publish

Collaborators

  • forbeslindesay
  • rollingversions-git-client-bot