Isomorphic-git: New feature: list git remotes

Created on 23 Jul 2018  路  4Comments  路  Source: isomorphic-git/isomorphic-git

Hey,

I would like a new command to list git remotes.
It seems like the whole list is already in the config file.

WDYT?

enhancement

Most helpful comment

@wmhilton I tried to tackle this one.

It seems that the current GitConfig won't allow us to list all named sections remote.

Should we add a new getter like getSections('remote') that could return this:

{
  origin: {
    url: 'https://...'
  },
  clever: {
    url: 'https://...'
  }
}

All 4 comments

@wmhilton I tried to tackle this one.

It seems that the current GitConfig won't allow us to list all named sections remote.

Should we add a new getter like getSections('remote') that could return this:

{
  origin: {
    url: 'https://...'
  },
  clever: {
    url: 'https://...'
  }
}

I was also wondering about the form of the return of listRemotes...

I think it should be an array with name and urls like this:

[
  { name: 'origin', url: 'https://...' },
  { name: 'clever', url: 'https://...' },
]

I think it should be an array with name and urls like this:

What about instead of name use remote? Just because that way it's the same as the remote parameter used in fetch and push. E.g.

[
  { remote: 'origin', url: 'https://...' },
  { remote: 'clever', url: 'https://...' },
]

:tada: This issue has been resolved in version 0.25.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

keshin picture keshin  路  5Comments

creationix picture creationix  路  4Comments

aanavaneeth picture aanavaneeth  路  3Comments

njlr picture njlr  路  5Comments

tyru picture tyru  路  4Comments