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

gitstat

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitstat

stream git status

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

gitstat - stream git status

The gitstat Node module streams paths of changed files tracked by a local Git repository.

Build Status

Usage

Read orginal output of the underlying git status -uno -z file by file:

var gitstat = require('gitstat'), status

status = gitstat('.')
status.on('readable', function () {
  var chunk
  while ((chunk = status.read()) !== null) {
    console.log('%s', chunk)
  }
})

Pipe filenames of added and/or modified files:

var gitstat = require('gitstat')

gitstat('.', 'AM')
  .pipe(process.stdout)

Types

repo()

A path to a local git repository.

mode()

Optionally configure which filenames should be emitted by passing Git statuses ("M|A|D|R|C|U") as String of undefined length. For example:

gitstat('.', 'AM')

This would return a readable stream that emits filenames of all added and/or modified files.

With the default mode (undefined), not filenames, but the original output of git status -uno -z is emitted file by file. For details please refer to man git-status.

Exports

gitstat(repo(), [mode()])

This function returns a Readable stream. On the first read this stream executes git status -uno -z and begins emitting paths according to mode. Untracked files are ignored.

Installation

NPM

License

MIT License

Keywords

FAQs

Package last updated on 15 Mar 2016

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