Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for remote refspecs #255

Closed
jdavid opened this issue Jun 30, 2013 · 7 comments
Closed

Add support for remote refspecs #255

jdavid opened this issue Jun 30, 2013 · 7 comments

Comments

@jdavid
Copy link
Member

jdavid commented Jun 30, 2013

There is a regression in the master branch regarding the 0.18.1 release. After the changes in libgit2 0.19 we have lost the Remote.fetchspec setter. To get back the ability to modify remote's refspecs, and to do so properly, we need to:

  • Implement a Refspec type, in a new file src/refspec.c
  • Wrap more libgit2 functions in the Remote type

Volunteers?

@xtao
Copy link
Contributor

xtao commented Jul 4, 2013

Hi, @jdavid I will do this.
Can you show more details?

@jdavid
Copy link
Member Author

jdavid commented Jul 4, 2013

Hi @xtao and thank you for volunteering!

This is the API to implement.

Constants:

GIT_DIRECTION_FETCH
GIT_DIRECTION_PUSH

Refspec type, src/refspec.c:

Refspec.direction => GIT_DIRECTION_FETCH / GIT_DIRECTION_PUSH
Refspec.dst => <str>
Refspec.dst_matches(refname:<str>) => True / False
Refspec.force => True/False
Refspec.src => <str>
Refspec.src_matches(refname:<str>) => True/False
Refspec.string => <str>

Remote type, remote.c:

Remote.add_fetch(refspec:<str>) => None
Remote.add_push(refspec:<str>) => None
Remote.clear_refspecs() => None
Remote.get_fetch_refspecs() => [<str>, ...]
Remote.get_push_refspecs() => [<str>, ...]
Remote.get_refspec(n:<int>) => <Refspec>
Remote.remove_refspec(n:<int>) => None

Note that:

Do you have questions?

@carlosmn
Copy link
Member

With libgit2 v0.20, we have the ability to set the fetch and push refspecs again. Removing the nth refspec isn't something we want to do anyway, so the only parts missing should be add_fetch, and add_push.

@xtao
Copy link
Contributor

xtao commented Jan 20, 2014

Fixed #318

@carlosmn
Copy link
Member

With the PRs that got merged recently, this can be closed, no?

@jdavid
Copy link
Member Author

jdavid commented Jan 24, 2014

yes, thanks!

@jdavid jdavid closed this as completed Jan 24, 2014
@IfeanyiEkperi
Copy link

Fixed #33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants