Socket
Socket
Sign inDemoInstall

gitconfiglocal

Package Overview
Dependencies
1
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gitconfiglocal

parse the .git/config file into a useful data structure


Version published
Weekly downloads
2.4M
increased by0.66%
Maintainers
1
Install size
15.3 kB
Created
Weekly downloads
 

Readme

Source

Build Status

gitconfiglocal

parse the .git/config file into a useful data structure

example

  • search config in $GIT_DIR (.git by default)
var gitconfig = require('gitconfiglocal');

gitconfig('./',function(err,config){
  console.log(config);
  /* prints:
  { core:
     { repositoryformatversion: '0',
       filemode: true,
       bare: false,
       logallrefupdates: true },
    remote:
     { origin:
        { url: 'git@github.com:soldair/node-gitconfiglocal.git',
          fetch: '+refs/heads/*:refs/remotes/origin/*' } } }
  */
});

  • specify $GIT_DIR via options:
gitconfig('./', { gitDir: 'path/to/gitdir' }, cb);

Keywords

FAQs

Last updated on 15 Feb 2019

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc