gitconfiglocal

WebJar for gitconfiglocal

License

License

BSD
Categories

Categories

config Application Layer Libs Configuration
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

gitconfiglocal
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

gitconfiglocal
WebJar for gitconfiglocal
Project URL

Project URL

https://www.webjars.org
Source Code Management

Source Code Management

https://github.com/soldair/node-gitconfiglocal

Download gitconfiglocal

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/gitconfiglocal/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>gitconfiglocal</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/gitconfiglocal/
implementation 'org.webjars.npm:gitconfiglocal:1.0.0'
// https://jarcasting.com/artifacts/org.webjars.npm/gitconfiglocal/
implementation ("org.webjars.npm:gitconfiglocal:1.0.0")
'org.webjars.npm:gitconfiglocal:jar:1.0.0'
<dependency org="org.webjars.npm" name="gitconfiglocal" rev="1.0.0">
  <artifact name="gitconfiglocal" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='gitconfiglocal', version='1.0.0')
)
libraryDependencies += "org.webjars.npm" % "gitconfiglocal" % "1.0.0"
[org.webjars.npm/gitconfiglocal "1.0.0"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.npm : ini jar [1.3.2,2)

Project Modules

There are no modules declared in this project.

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: '[email protected]:soldair/node-gitconfiglocal.git',
          fetch: '+refs/heads/*:refs/remotes/origin/*' } } }
  */
});
  • specify $GIT_DIR via options:
gitconfig('./', { gitDir: 'path/to/gitdir' }, cb);

Versions

Version
1.0.0