1363 Commits

Author SHA1 Message Date
Sheeo
f28a199351 Install cffi>=1 on travis 2015-08-28 19:51:39 +02:00
Michael Sondergaard
becc265c78 Don't use the deprecated cffi.verify by default
Instead this does what is recommend in the CFFI docs here: https://cffi.readthedocs.org/en/latest/cdef.html?highlight=verify#out-of-line-api

This also means building the cffi extension is neatly handled by cffi's setuptools integration itself, so we can delete the code in setup.py that used to do this.
2015-08-28 19:36:58 +02:00
David Six
25d02259df Fix: pass push_opts to git_remote_push 2015-08-26 11:15:47 -04:00
J. David Ibáñez
27e3450232 Get ready to release v0.23.0 v0.23.0 0.23.0 2015-08-14 16:56:30 +02:00
Carlos Martín Nieto
4f00dad086 Don't throw if there is no merge base
Not finding a merge base between two commits isn't an exceptional case,
it's just a different result.
2015-07-31 10:50:15 +02:00
Santiago Perez De Rosso
9dd74dd593 add doc for DiffLine 2015-07-16 11:35:46 -04:00
J. David Ibáñez
c5eae8942d Merge remote-tracking branch 'carlos/development' 2015-07-12 12:20:27 +02:00
J. David Ibáñez
2fdfdcdc4b Get ready to release v0.22.1 v0.22.1 2015-07-12 12:04:58 +02:00
Carlos Martín Nieto
7ff6f6efb7 Add repr output for TreeEntry
When iterating over a tree, its entries show up as objects with an
address, which makes it hard to distinguish.

Add a method to handle repr and make it easier to play around with them
in the console.
2015-07-07 14:06:35 +02:00
Carlos Martín Nieto
f09bbe79a8 Update installation docs with v0.23 2015-07-06 18:49:20 +02:00
Carlos Martín Nieto
81520c9c62 Update to libgit2 v0.23 2015-07-06 18:49:20 +02:00
J. David Ibáñez
6939b9b203 Fix indent error 2015-06-16 20:06:29 +02:00
Justin Clift
cc898d29e5 Typo fix 2015-06-16 17:13:50 +01:00
J. David Ibáñez
060b3fbaec Update changelog 2015-06-05 19:26:30 +02:00
vtemian
5469f0c891 Remove items from index, based on stage 2015-06-03 17:31:59 +03:00
Carlos Martín Nieto
74b81bf180 Add support for querying attributes
Expose a method in the repository which allows querying an attribute for
a file and converts the result to the python equivalent.
2015-05-20 20:56:40 +02:00
J. David Ibáñez
e46119838b Merge remote-tracking branch 'rmoehn/cherry-pick-cleanup' 2015-05-03 11:37:57 +02:00
J. David Ibáñez
8a196f656b Merge remote-tracking branch 'cjwatson/merge-index-path-refs' 2015-05-03 11:33:28 +02:00
J. David Ibáñez
deb50536f0 docs: remove manual singatures from py files
These are only needed in C code. With Python files the signatures are
automatically generated. The only drawback is the return value is not
included in the signature, so document it in the body of the docstring.
2015-05-03 11:16:17 +02:00
J. David Ibáñez
6da3d8f8a8 Fix a couple of warnings shown by pyflakes 2015-05-03 11:15:51 +02:00
J. David Ibáñez
52dd956896 Merge remote-tracking branch 'rmoehn/optional-args' 2015-05-03 10:13:55 +02:00
J. David Ibáñez
1f98ba6495 docs: fix build errors 2015-05-03 10:07:00 +02:00
J. David Ibáñez
d63c2d4fd7 Merge remote-tracking branch 'carlos/diff-stats' 2015-04-29 10:47:21 +02:00
Carlos Martín Nieto
5b50579790 Add a recipe for git clone --mirror
It's not necessarily obvious how to perform a mirror, so add a recipe
which tells what git does as well as provide example code of how to
perform the same steps in pygit2.
2015-04-28 19:53:39 +02:00
Carlos Martín Nieto
42d81e33ec Add DiffStats
This wraps git_diff_stats and can be retrieved through a Diff. It
includes a formatting method.
2015-04-28 16:21:56 +02:00
Carlos Martín Nieto
0ce4d3b9a8 Allow creating a remote with a particular fetch refspec
This makes it a lot more convenient to create a remote and override the
fetch refspec it gets created with.
2015-04-28 13:39:15 +02:00
Carlos Martín Nieto
3091c7aa87 Remove mistaken submodule in the tree
The path test/data/testrepo was mistakenly added as a submodule and the
error was not caught before merging. Remove this path as it should not
exist on the repo.
2015-04-28 01:55:20 +02:00
Richard Möhn
654e4bf56f Cherry-pick recipe: clean up after picking
In b3025e3fe I had written that when following my recipe, the repository
remains in cherry-picking mode afterwards. In issue #516 I was told that
Repository.state_cleanup() is needed to correct that. Therefore add it
to the recipe.

Also add a note near the documentation for cherry-pick, so that nobody
will overlook this again. Apparently there are other times when you need
to do Repository.state_cleanup() as well, but it's not documented, I
don't know when and I don't want to take the time and find out. So leave
it at that for now.
2015-04-25 14:49:48 +09:00
J. David Ibáñez
c072a77e4b Merge remote-tracking branch 'rmoehn/diff-iter' 2015-04-23 12:45:44 +02:00
J. David Ibáñez
d3d60c75f8 Merge remote-tracking branch 'rmoehn/create_commit_arg' 2015-04-23 12:35:17 +02:00
Richard Möhn
1b9cb54927 Add hint to Diff.__iter__()
I'm not the guy who looks at examples in the first place and I guess
there are other people like me. When I wanted find out how to get
information out of a Diff, I looked at the documented methods and didn't
find anything. Only later @cmn showed me the [p for p in diff] example
in the documentation. Add a short piece of information that gives a hint
to those who prefer the dry API docs.
2015-04-23 16:38:55 +09:00
Colin Watson
efb49f8418 Keep path references in merge_file_from_index
IndexEntry._to_c requires its caller to hold a reference to the path it
returns until it no longer needs the C structure.
Repository.merge_file_from_index was not doing so, causing the merge
text to contain garbage from freed memory in some cases.
2015-04-23 04:29:13 +01:00
Richard Möhn
7a6465833b remote.py: Denote optional parameters as such
In the online documentation to Pygit2 it was not visible that (some of)
the parameters to Remote.fetch() and Remote.push() were optional. Fix
this. (I'm not sure if the way I did it is the idiomatic way of marking
a parameter optional in Python docstrings.)
2015-04-22 17:46:44 +09:00
Richard Möhn
b69a2f6197 Clarify docstring for Repository.create_commit
Change the argument "reference" to "reference_name", because "reference"
might lead to the assumption that one has to pass a pygit2.Reference.
2015-04-22 17:25:43 +09:00
Richard Möhn
b3025e3fe1 Add git-cherry-pick recipes
Add the way that worked for me. Not sure if it is idiomatic. When doing
the convenience-mode cherry-pick, the repo remains in cherry-picking
mode afterwards. I've already added an issue for this.
2015-04-22 17:14:45 +09:00
Patrick Steinhardt
f923e20f2d submodule: reimplement with Python CFFI.
The submodule type has been implemented as a C type. When opening
a submodule's repository this leads to the bug that instead of an
actual pygit2.Repository being instantiated we only create an
object of the C Repository type.

As this is not trivially fixed within the C code, reimplement the
submodule type as a Python interface with CFFI. As submodules
provide no functionality that is usually accessed repeatedly the
code paths should not prove performance critical. In addition,
maintainability is improved by this reimplementation.
2015-04-16 11:36:41 +02:00
Santiago Perez De Rosso
cd7e2b21be make pygit2 work with pyinstaller 2015-04-03 11:35:54 -04:00
J. David Ibáñez
1f755c601c Fix indentation style 2015-04-03 09:19:29 +02:00
Santiago Perez De Rosso
08f2956e97 diff of blob to blob in repository.diff 2015-03-31 19:30:15 -04:00
Santiago Perez De Rosso
99e1cad393 bug fix in repository.diff 2015-03-31 13:49:39 -04:00
J. David Ibáñez
da98890bd1 Add DiffHunk.header
Commes from PR #346
2015-03-30 17:38:20 +02:00
Vladimir Rutsky
ca39a65054 fix typo: "Troobleshooting" 2015-03-30 14:19:58 +03:00
Patrick Steinhardt
cf56a695f9 Fix error when merging files with unicode content.
When merging index entries where the corresponding files contain Unicode
codepoints an error is thrown. Decode the C string using UTF-8 to fix the issue
and adjust the test case for merging files to contain umlauts to catch such
errors.
2015-03-19 07:48:18 +01:00
J. David Ibáñez
8b05b296c2 New DiffDelta.status_char() 2015-03-16 19:12:20 +01:00
J. David Ibáñez
b2ffc8a8d5 New DiffFile members: size, flags and mode 2015-03-16 18:17:06 +01:00
J. David Ibáñez
e32df6a1c8 internal: add wrap_diff_hunk 2015-03-16 17:34:48 +01:00
J. David Ibáñez
fe849f659e Update changelog 2015-03-16 16:34:43 +01:00
Carlos Martín Nieto
c099655fc0 TreeEntry: compare ids when two entrie sort equally
The function we were using `git_tree_entry_cmp()` is only meant for
git-compatible sorting in a tree and thus does not take the id into
account. This is however important in order to keep value equality. In
order to avoid issues with assymetry, we compare the id any time when
two entries are equal according to their position in a tree.
2015-03-15 00:15:15 +01:00
J. David Ibáñez
f5485bb86f Merge remote-tracking branch 'pks/bare-conflicts' 2015-03-13 10:09:31 +01:00
J. David Ibáñez
318c6a8bee tests: fix warning, do not use deprecated assertEquals 2015-03-13 09:48:28 +01:00