Skip to content

Update to libgit2 v0.27 #783

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

Merged
merged 2 commits into from
Mar 30, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

cd ~

git clone --depth=1 -b maint/v0.26 https://github.com/libgit2/libgit2.git
git clone --depth=1 -b maint/v0.27 https://github.com/libgit2/libgit2.git
cd libgit2/

mkdir build && cd build
Expand Down
18 changes: 9 additions & 9 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ It is recommended to use the latest version in each series. Example of
compatible releases:

+-----------+--------+--------+--------+--------+
|**libgit2**| 0.26.3 | 0.25.1 | 0.24.6 | 0.23.4 |
|**libgit2**| 0.27.0 | 0.26.3 | 0.25.1 | 0.24.6 |
+-----------+--------+--------+--------+--------+
|**pygit2** | 0.26.4 | 0.25.1 | 0.24.2 | 0.23.3 |
|**pygit2** | 0.27.0 | 0.26.4 | 0.25.1 | 0.24.2 |
+-----------+--------+--------+--------+--------+

.. warning::
Expand All @@ -65,9 +65,9 @@ directory, do:

.. code-block:: sh

$ wget https://github.com/libgit2/libgit2/archive/v0.26.0.tar.gz
$ tar xzf v0.26.0.tar.gz
$ cd libgit2-0.26.0/
$ wget https://github.com/libgit2/libgit2/archive/v0.27.0.tar.gz
$ tar xzf v0.27.0.tar.gz
$ cd libgit2-0.27.0/
$ cmake .
$ make
$ sudo make install
Expand Down Expand Up @@ -149,9 +149,9 @@ Install libgit2 (see we define the installation prefix):

.. code-block:: sh

$ wget https://github.com/libgit2/libgit2/archive/v0.26.0.tar.gz
$ tar xzf v0.26.0.tar.gz
$ cd libgit2-0.26.0/
$ wget https://github.com/libgit2/libgit2/archive/v0.27.0.tar.gz
$ tar xzf v0.27.0.tar.gz
$ cd libgit2-0.27.0/
$ cmake . -DCMAKE_INSTALL_PREFIX=$LIBGIT2
$ make
$ make install
Expand Down Expand Up @@ -187,7 +187,7 @@ everytime. Verify yourself if curious:

.. code-block:: sh

$ readelf --dynamic lib/python2.7/site-packages/pygit2-0.26.0-py2.7-linux-x86_64.egg/_pygit2.so | grep PATH
$ readelf --dynamic lib/python2.7/site-packages/pygit2-0.27.0-py2.7-linux-x86_64.egg/_pygit2.so | grep PATH
0x000000000000001d (RUNPATH) Library runpath: [/tmp/venv/lib]


Expand Down
2 changes: 1 addition & 1 deletion pygit2/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def add_file(self, path, level=0, force=0):
"""Add a config file instance to an existing config."""

err = C.git_config_add_file_ondisk(self._config, to_bytes(path), level,
force)
ffi.NULL, force)
check_error(err)

def snapshot(self):
Expand Down
1 change: 1 addition & 0 deletions pygit2/decl.h
Original file line number Diff line number Diff line change
Expand Up @@ -572,6 +572,7 @@ int git_config_delete_entry(git_config *cfg, const char *name);
int git_config_add_file_ondisk(git_config *cfg,
const char *path,
git_config_level_t level,
const git_repository *repo,
int force);

int git_config_iterator_new(git_config_iterator **out, const git_config *cfg);
Expand Down
4 changes: 2 additions & 2 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include <Python.h>
#include <git2.h>

#if !(LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR == 26)
#error You need a compatible libgit2 version (v0.26.x)
#if !(LIBGIT2_VER_MAJOR == 0 && LIBGIT2_VER_MINOR == 27)
#error You need a compatible libgit2 version (v0.27.x)
#endif

/*
Expand Down