Commit Graph

1363 Commits

Author SHA1 Message Date
Bogdan Vasilescu 371c97cadb Update diff.rst
`old_lineno` appeared twice. I think it should be `new_lineno` instead.
2017-07-18 12:58:56 -04:00
anatoly techtonik ab3bb01249 install.rst: Use PyPI wheels on Windows 2017-07-07 21:24:04 +03:00
J. David Ibáñez 62c70e852d Release 0.26.0 2017-07-06 17:12:44 +02:00
J. David Ibáñez e81f45c4c6 Merge remote-tracking branch 'nhynes/br-is-co' 2017-07-05 23:20:15 +02:00
J. David Ibáñez 295166bb64 Fixing AppVeyor & Travis
AppVeyor, upgrade to 0.26
Travis, disable pypy3 for now
2017-07-03 22:55:10 +02:00
Carlos Martín Nieto 96d37e16a9 Update install docs with the v0.26 version of libgit2 2017-07-03 15:48:20 +02:00
Carlos Martín Nieto 2ce8b952c4 Update Travis CI script to use libgit2 v0.26 2017-07-03 15:47:52 +02:00
Carlos Martín Nieto e41f71f458 Update for libgit2 v0.26
The API isn't changing as much recently so all we needed to adjust was the
proper capitalisation of the error string.
2017-07-03 15:40:29 +02:00
Mark Adams c6305a062b revert: Add support for git_revert_commit via Repository.revert_commit()
This change adds `Repository.revert_commit()` which wraps around
`git_revert_commit` which will return an `Index` with the appropriate
changes to revert the specified commit.

Fixes #710
2017-06-05 16:08:39 -05:00
Mark Adams 87beb76dcc Modify Index.write_tree() to have more robust Repository detection
Currently, Index.write_tree() relies on either the caller passing in a
`repo=` arg or the underlying `git_index` being already bound to a
`git_repository`. This ignores the case where the caller does not pass
a `repo` argument to `Index.write_tree()` but the `Index._repo`
property is populated on the index.

This change modifies Index.write_tree() to use the passed-in `repo`
argument, falls back to using `Index._repo` and then assumes that
`git_index` must be bound to a `git_repository`. This change should make
Index.write_tree() a little more robust in the most common use-case.
2017-06-05 16:02:01 -05:00
Lukas Fleischer f18de427bf Randomize OID object hashes
Instead of using type punning to convert the OID to a Python hash, use
_Py_HashBytes() to hash the OID again. This means we no longer make any
assumptions on the internal representation of OID values or Python
hashes (before this commit, we at least relied on the fact that OID
hases are longer than Python hashes). Moreover, the random seed stored
in PYTHONHASHSEED is now honored.

This also fixes a compiler warning seen with -Wstrict-aliasing.

Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
2017-05-07 10:03:17 +02:00
J. David Ibáñez f841c62fa6 Drop support for Python 3.2, cffi 1.10 doesn't work with 2017-05-07 09:53:10 +02:00
Lukas Fleischer 035d4a9396 Mark index unsigned in get_pylist_from_git_strarray()
Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
2017-05-07 07:47:00 +02:00
Lukas Fleischer 21d668421f Remove unused variable from Repository_init()
Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
2017-05-07 07:44:01 +02:00
Lukas Fleischer b88dc86842 Fix parameter passing of describe patterns
When ffi.new() is used to build a new pointer object, the returned
pointer object has ownership on the allocated memory. When it is
garbage-collected, then the memory is freed. Thus, we need to make sure
the original object survives its use, otherwise the casted pointer will
point to garbage.

This fixes one test which was failing with the latest CFFI version, see
issue #694. Thus, this commit also reverts 803b1cb (cffi 1.10 not yet
supported, 2017-03-22) where the latest CFFI version was marked as
unsupported.

Signed-off-by: Lukas Fleischer <lfleischer@lfos.de>
2017-05-06 21:49:47 +02:00
J. David Ibáñez 8559b2da20 Release 0.25.1 2017-04-25 19:08:10 +02:00
J. David Ibáñez 9325494d6f docs: fix references 2017-04-21 11:36:40 +02:00
J. David Ibáñez 74717bed55 Merge remote-tracking branch 'tmr232/references-object' 2017-04-21 11:13:09 +02:00
Tamir Bahar 3818555e14 Added Repository.references accessor. 2017-04-21 08:51:41 +00:00
J. David Ibáñez 706c60c4ab Clean some cffi warnings
"has no values explicitly defined"
2017-04-20 22:32:03 +02:00
J. David Ibáñez 0733ba4da3 docs: fix make html 2017-04-19 21:34:07 +02:00
Tamir Bahar 320ee5e733 Added GIT_BRANCH_ALL 2017-04-19 21:10:11 +03:00
Tamir Bahar d6716e035a Updated docs to match new branches API. 2017-04-19 21:03:43 +03:00
Tamir Bahar d14438725e Added basic Repository.branches implementation. 2017-04-17 23:02:58 +03:00
J. David Ibáñez dd57c9b366 Fixing error on Python 2.7 / Windows 64bits 2017-04-09 13:11:50 +02:00
J. David Ibáñez f2c89a760a (partial) review the way we handle Python int/long 2017-04-09 12:33:24 +02:00
J. David Ibáñez f37cf25b8e Fix warning, and coding style a bit 2017-04-08 16:56:04 +02:00
J. David Ibáñez 11ff7a99eb Options, improve error messages 2017-04-08 11:16:15 +02:00
J. David Ibáñez 9335819795 Opening repos, raise more meaningful exceptions 2017-04-05 22:18:21 +02:00
Tamir Bahar 784583d21e Fixed indentation 2017-04-05 21:59:30 +03:00
Tamir Bahar b81810e9cb Better error messages for opening repos.
Closes #645.
2017-04-05 20:59:36 +03:00
Tamir Bahar 7ee851273a Added explicit check for `path = None` in `init_repository`
Closes #688.
2017-04-05 16:37:25 +03:00
Nick Hynes 1fadc2eae0 Wrap branch_is_checked_out 2017-03-29 18:14:46 -04:00
Nick Hynes 453fd8a9a3 Add docs 2017-03-27 17:10:51 -04:00
Nick Hynes 630d905e73 Add stash tests 2017-03-27 17:10:45 -04:00
Nick Hynes 9be907983f Wrap stash_pop 2017-03-27 16:42:38 -04:00
Nick Hynes b31ac50210 Wrap stash_drop 2017-03-27 16:33:32 -04:00
Nick Hynes da233b16c5 Wrap git_stash_apply 2017-03-27 16:31:21 -04:00
Nick Hynes 1a842ff8bd Wrap git_stash_save 2017-03-27 16:20:33 -04:00
Nick Hynes cbbf9f1f87 Fix Signature._pointer 2017-03-27 16:18:21 -04:00
Nick Hynes a294655aa5 Add declarations for git-stash 2017-03-27 16:18:13 -04:00
J. David Ibáñez 5a940987cd Add support for Python 3.6 2017-03-22 21:45:12 +01:00
J. David Ibáñez 354d56a95c Update copyright years 2017-03-22 21:15:34 +01:00
Jason Ziglar 8327e1bee3 Add test for init_submodules() and update_submodules() 2017-03-22 11:23:17 -04:00
Jason Ziglar 15326b731f Add update_submodules() command 2017-03-22 11:23:17 -04:00
Jason Ziglar f5cd6da307 Add init_submodules() command 2017-03-22 11:23:17 -04:00
J. David Ibáñez 803b1cb154 cffi 1.10 not yet supported 2017-03-22 16:01:23 +01:00
J. David Ibáñez d622e87654 test options, avoid side effects
This makes tests in PR#692 to pass
2017-03-22 13:38:11 +01:00
J. David Ibáñez 819cbff552 Remove some tabs 2017-02-09 17:31:50 +01:00
Matthaus Woolard 4fbc1f1c05 Add support for custom backends
Signed-off-by: Matthaus Woolard <matthaus.woolard@gmail.com>
2017-02-09 15:57:56 +00:00