mirror of
https://github.com/atom/atom.git
synced 2026-02-09 06:05:11 -05:00
Added .getConfigValue
This commit is contained in:
@@ -233,8 +233,14 @@ export default class GitRepositoryAsync {
|
||||
//
|
||||
// * `path` An optional {String} path in the repository to get this information
|
||||
// for, only needed if the repository has submodules.
|
||||
//
|
||||
// Returns a {Promise} which resolves to the {String} git configuration value
|
||||
// specified by the key.
|
||||
getConfigValue (key, _path) {
|
||||
throw new Error('Unimplemented')
|
||||
return this._getRepo(_path)
|
||||
.then(repo => repo.configSnapshot())
|
||||
.then(config => config.getStringBuf(key))
|
||||
.catch(_ => null)
|
||||
}
|
||||
|
||||
// Public: Returns the origin url of the repository.
|
||||
|
||||
Reference in New Issue
Block a user