1074 Commits

Author SHA1 Message Date
Carlos Martín Nieto
7f922ae9d9 Make python3 happy 2014-07-10 11:29:03 +02:00
Carlos Martín Nieto
ae32ad12ee Support del in ConflictCollection 2014-07-10 11:27:10 +02:00
Carlos Martín Nieto
5ed9eb4228 Add documentation for conflicts and fixup Index
Add documentation for the conflicts, and add some for IndexEntry and
Index which went missing during the conversion to cffi.
2014-07-10 09:08:16 +02:00
Carlos Martín Nieto
15576fcbdc Add tests for Index conflict access 2014-07-10 09:08:16 +02:00
Carlos Martín Nieto
78d80147ab Move merge tests to their own file
The method is in Repository, but the merge functionality is separate. We
will introduce more tests in this area later.
2014-07-10 09:08:16 +02:00
Carlos Martín Nieto
1985a95b6b Add looking up conflicts in an Index 2014-07-10 09:08:16 +02:00
Carlos Martín Nieto
97ee7ab179 Move Index to cffi
This commit gives us feature-parity with the version in C.
2014-07-10 09:08:16 +02:00
Carlos Martín Nieto
31fc235b59 Fix sphinx complaints about the docs
Use the right namespace so Refspec and TransferProgress show up. These
classes are not instantiated by the user, so they were not promoted to
the pygit2 module. Use autoclass so it lists everything for us.

Also use autoclass for the reflog. We had a difference is oid vs id
between the docs and the code.
2014-07-10 08:25:54 +02:00
vtemian
6f438ad173 Added sphinx rtd theme 2014-07-09 18:13:49 +03:00
vtemian
d8864bdf02 Added docs 2014-07-09 16:50:17 +03:00
vtemian
19dd7629d3 Proper naming 2014-07-09 16:46:52 +03:00
vtemian
02fd05baae Added clean_state_files 2014-07-09 16:39:34 +03:00
J. David Ibáñez
7e41bd4af3 Merge remote-tracking branch 'carlos/merge-docs' 2014-07-08 14:07:56 +02:00
Carlos Martín Nieto
9a7348a9d0 Update docs for merging
Remove references to MergeResult and put merge_analysis in the docs.
2014-07-08 13:55:18 +02:00
Carlos Martín Nieto
0bfead36b2 branch: correct notion of remote-tracking branch and upstream
The current documentation text seems to be very confused about what a
remote-tracking branch is and what the relationship to an upstream is.

Correct the text to talk about the upstream branch when dealing with the
upstream configuration, instead of implying that it's related to the
setup of remote-tracking branches.
2014-07-06 16:11:27 +02:00
Jasper Lievisse Adriaanse
b0bf223276 Tweak include/lib dir detection in ffi.py
Joint work with @carlosmn
2014-07-03 10:51:32 +02:00
Carlos Martín Nieto
1d509c1109 travis: download a tag instead of master
libgit2's development now happens on the master branch, which means we
can't use it to refer to the latest release. Download v0.21.0 explicitly
instead.
2014-07-03 08:57:47 +02:00
J. David Ibáñez
3cbc9b6c33 README, tell to install cffi first 2014-07-01 16:36:05 +02:00
J. David Ibáñez
7b3201d868 Get ready to release 0.21.0 v0.21.0 2014-06-27 17:28:01 +02:00
J. David Ibáñez
bf3db3183c Merge remote-tracking branch 'michaeljones/documentation' 2014-06-27 11:16:13 +02:00
Michael Jones
b96b285cea Improve diff & diff_to_buffer doc formatting
We switch to a parameter list for both functions and add a return type.
We also remove the indentation from the second line of the explanation
which was causing Sphinx to return it as two lines instead of one
continuous one.

We also added return types.

I am not sure of the type of the GIT_DIFF* flags so I have not included
that.
2014-06-26 23:30:47 +01:00
Michael Jones
9811123922 Fix docstrings for Blob.diff & diff_to_buffer
They were both missing a closing parenthesis which stop Sphinx from
interpreting and formatting them properly.
2014-06-26 23:27:23 +01:00
Jack O'Connor
b190169f5e support setting a detatched HEAD 2014-06-22 19:11:04 -07:00
Jack O'Connor
a063867fe0 Index: add a setter for workdir 2014-06-22 18:57:09 -07:00
J. David Ibáñez
a9fcbb33d1 Check errors returned by git_signature_dup 2014-06-21 21:14:33 +02:00
J. David Ibáñez
791b39433c C coding style: remove tabs 2014-06-21 10:23:52 +02:00
J. David Ibáñez
88a28f7ed8 Merge remote-tracking branch 'carlos/development' 2014-06-21 10:14:00 +02:00
J. David Ibáñez
e3d36ad400 Merge remote-tracking branch 'michaeljones/documentation' 2014-06-20 09:54:45 +02:00
Michael Jones
1f111c08b6 Provide example for Reference.log_append
I would have found this useful when trying to do reflog additions. It
might not be massively complex but examples always help.
2014-06-15 11:39:24 +01:00
Michael Jones
7296b921cc Fix spelling typo 2014-06-15 11:30:33 +01:00
Michael Jones
83ccdd9c1f Explain that reference targets are writable
It might seem like a really obvious point to make but without
emphasizing it, it isn't completely clear. I would like to mention this
in the Branch section as well for how to point a branch at another
commit but I can't see how to smoothly slide it in.
2014-06-15 11:28:26 +01:00
Michael Jones
28ae47f42b Provide a doc example for discover_repository
To clarify the behaviour and usage.
2014-06-15 11:11:16 +01:00
Michael Jones
bd322fa132 Correct LIBGIT2_VERSION name and add documentation
LIBGIT2_VERSION was previously recorded as LIBGIT2_VER_VERSION which is
incorrect.

We also add basic explanations to all the constants so that the page is
a little less bare. Perhaps this should be done as autodoc style
comments in the code but I guess not.
2014-06-15 11:11:16 +01:00
J. David Ibáñez
981fc32af6 travis: test 3.4 too 2014-06-09 09:19:09 +02:00
Carlos Martín Nieto
bde58d9727 Remote: make renaming take a method call
Renaming a remote in pygit2 has been done via Remote.name= up to now,
but this is inherently unsafe, as it provides no way to pass up the
refspecs that libgit2 was unable to remap.

In fact, if there ever was such problem, we would have segfaulted.

libgit2 now provides a much more direct way of getting back the results,
so expose it as the return value of Remote.rename(). This also removes
the hint that a rename might be something that happens only to the
in-memory structure.
2014-06-08 20:35:21 +02:00
Carlos Martín Nieto
130fff6f2c Bump required libgit2 version to 0.21 2014-06-08 20:35:15 +02:00
Carlos Martín Nieto
d3af09e86d Adjust to clone_into signature change 2014-06-07 21:45:10 +02:00
Carlos Martín Nieto
1d4031bacd Merge remote-tracking branch 'upstream/master' into development
Conflicts:
	pygit2/decl.h
	test/test_repository.py
2014-06-07 21:38:07 +02:00
Carlos Martín Nieto
491e352e41 Update to latest libgit2 2014-06-07 21:31:47 +02:00
J. David Ibáñez
95e6593625 init_repository now wraps git_repository_init_ext
Fixes #347
2014-06-03 12:52:46 +02:00
J. David Ibáñez
6cf06ba9fe Rewrite init_repository using cffi 2014-06-02 18:50:55 +02:00
Carlos Martín Nieto
9e91a390cc Index: accept a tree for read_tree()
An index may not have an associated repository, so giving it an id in
that case is useless. Raise an error in that case and accept a Tree
object to make the function useful then.
2014-05-27 18:52:05 +02:00
Carlos Martín Nieto
f69a57a82a Index: make the file optional
There is no obligation for an index to exist as a file at all.
2014-05-27 18:52:05 +02:00
Carlos Martín Nieto
97c0e476a3 Index: add failing tests for a standalone Index
The index can exist purely as a data structure. Let's test that so we
make sure we support that.
2014-05-27 18:51:58 +02:00
Carlos Martín Nieto
19be4b6aa4 clone: wrap clone_into()
This allows the user to prepare the repository and remote with whichever
custom settings they want before performing the "clone" proper.
2014-05-20 03:23:25 +02:00
Carlos Martín Nieto
b1bacdd8d5 Wrap config snapshot functions
These allow complex reads to come from the same version of the config.
2014-05-18 11:03:30 +02:00
Carlos Martín Nieto
2b5e408029 Merge remote-tracking branch 'upstream/master' into development
Reconcile the changes between the ffi changes upstream with the changes
to libgit2 in the dev branch.

Conflicts:
	src/config.c
	src/options.c
	src/refspec.c
	src/remote.c
2014-05-16 04:41:26 +02:00
J. David Ibáñez
06b7438456 Merge remote-tracking branch 'ipmcc/fixblobdiff' 2014-05-08 15:54:34 +02:00
Ian P. McCullough
6b3f9e92f7 And on diff_to_buffer too. 2014-05-08 09:01:06 -04:00
Ian P. McCullough
0c62c83135 Fix format string for Blob.diff(); Format string items out of order relative to docstring and outargs. 2014-05-08 08:50:21 -04:00