Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-transport-protocol

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-transport-protocol

a r/w stream that wraps a r/w stream and formats the data according to the git transfer protocol

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
16K
increased by11.51%
Maintainers
1
Weekly downloads
 
Created
Source

git-transport-protocol

wrap a r/w stream in this transport r/w stream for transforming writes into valid git packet lines, and reads from git packet lines into JS objects.

var net = require('net')
  , transport = require('git-transport-protocol')
  , client
  , tcp

tcp = net.connect({host: 'github.com', port: 9418})

client = transport(tcp)

client.on('data', function(data) {
  // data will be JS objects
})

// start a fetch
client.write('git-upload-pack /chrisdickinson/plate.git\0host=github.com\0')

API

transport(connection) -> client

wrap any readable/writable stream with git-packet-line senders and receivers.

client.setRawMode([true]) -> rawmode boolean

enter or exit "raw" mode -- this makes writes skip the pkt-write portion of the stream and go directly to the connection.

this is useful for, e.g., sending packfile data.

License

MIT

Keywords

FAQs

Package last updated on 14 May 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc