★ wanayoo — archive 1999 https://github.com/libgit2/pygit2/pull/344Nouvelle recherche | Portail wanayoo
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

Added git_index_add_all #344

Merged
merged 3 commits into from Feb 16, 2014
Merged

Added git_index_add_all #344

merged 3 commits into from Feb 16, 2014

Conversation

@MartinStolle
Copy link
Contributor

MartinStolle commented Feb 12, 2014

Hello,

noticed the method (http://libgit2.github.com/libgit2/#HEAD/group/index/git_index_add_all) is missing and added it. Flags, callback and payload are missing as argument though, but it should work for most use cases.

See example below:

print repo.status()
{'config.h': 128, 'TODO.txt': 128, 'commit.h': 128, 'diff.c': 128, 'branch.c': 128, 'commit.c': 128, 'README.rst': 128, 'COPYING': 128, 'blame.c': 128, 'how-to.txt': 128, 'blob.h': 128, 'blame.h': 128}
repo.index.add_all(['README.rst', 'COPYING'])
print repo.status()
{'config.h': 128, 'TODO.txt': 128, 'commit.h': 128, 'diff.c': 128, 'branch.c': 128, 'commit.c': 128, 'README.rst': 1, 'COPYING': 1, 'blame.c': 128, 'how-to.txt': 128, 'blob.h': 128, 'blame.h': 128}
repo.index.add_all(['TODO.txt', '*.h'])
print repo.status()
{'config.h': 1, 'TODO.txt': 1, 'commit.h': 1, 'diff.c': 128, 'branch.c': 128, 'commit.c': 128, 'README.rst': 1, 'COPYING': 1, 'blame.c': 128, 'how-to.txt': 128, 'blob.h': 1, 'blame.h': 1}

Let me know if I need to change or add anything.

Kind regards

Moved git strarray conversion to utils
@jdavid
Copy link
Member

jdavid commented Feb 13, 2014

It looks good, just please add unit tests. Thanks!

@MartinStolle
Copy link
Contributor Author

MartinStolle commented Feb 13, 2014

Alright, added unit test.

@jdavid jdavid merged commit 1a17256 into libgit2:master Feb 16, 2014
1 check passed
1 check passed
default The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.