1363 Commits

Author SHA1 Message Date
Carlos Martín Nieto
d0b00e3124 Add support for libgit2 feature detection
This lets us ask the library whether it supports threading, https and
ssh.
2015-01-14 20:47:47 +01:00
Greg Fitzgerald
81bde5d0e7 Fix compiler warnings 2015-01-14 14:25:41 +00:00
Peter Dave Hello
e15c0d828b Use svg instead of png to get better image quality 2015-01-14 02:15:20 +08:00
Matthew Duggan
b2abfdec9e Note that Refspec constructor is internal. Fix typo. 2015-01-12 18:23:03 -08:00
Matthew Duggan
34fb1c00eb Make it explicit that respecs are added as strings. 2015-01-12 18:22:25 -08:00
Matthew Duggan
52ac41a362 Make it explicit that Refspec objects are not for construction 2015-01-12 18:20:11 -08:00
Matthew Duggan
5a06cd2688 Make it explicit what to do when no passphrase is needed 2015-01-12 18:20:07 -08:00
Carlos Martín Nieto
78695aa93a Change required version to 0.22 2015-01-12 20:00:17 +01:00
Carlos Martín Nieto
66d55aee7e Add certificate callback for clone
We do not pass anything as the certificate, as there doesn't seem to be
anything sensible for checking it.
2015-01-12 18:39:21 +01:00
Carlos Martín Nieto
f68b266e60 Remote: generalize push()
Move to use git_remote_push() instead of doing the steps ourselves. We
also change to accept a list of refspecs instead of just the one refspec
for the push method.

As part of this, we no longer error out if the server rejected any
updates, as this is a different concern from whether the push itself
failed or not. We do still error out if we attempt to push non-ff
updates.
2015-01-12 18:39:21 +01:00
Carlos Martín Nieto
1dbf94011a Migrate to 0.22
Apart from the usual API changes, we now need to introduce the concept
of whether we still own the C object underneath our Repository and
Remote objects.

When using the custom callbacks for repository and remote creation
during clone, we pass the pointer and thus ownership of the object back
to the library. We will then get the repository back at the end.

We return the object which was handed to us rather than opening the
repository again with the local path as there is now a much higher
chance that the cloned repository does not use the standard backends.
2015-01-12 18:39:21 +01:00
Lukas Fleischer
4cbfade973 Fix data type of options in init_repository()
Initializers for the char * fields of the git_repository_init_options
structure must be cdata pointers.

Signed-off-by: Lukas Fleischer <info@cryptocrack.de>
2015-01-10 21:30:26 +01:00
J. David Ibáñez
e81d395adf Merge remote-tracking branch 'rmoehn/master' 2015-01-10 21:24:17 +01:00
Richard Möhn
d341cff7d6 Fix documentation for Repository.listall_branches
Add a description of the possible flags and turn the "tuple" into a
"list", as it had already happened in code and part of the documentation
in aa5877e0.
2015-01-09 19:25:50 +01:00
Greg Fitzgerald
4f88840e93 Fix use-after-free when patch outlives diff 2015-01-05 19:20:47 +00:00
Richard Möhn
22d1aef50d Remove obsolete git-branch recipe
The git-branch recipe says: »Note that the next release will probably
allow repo.listall_branches().« Concluding from the README,
Repository.listall_branches() was included in some release prior to
0.20.0, so at least that statement is obsolete.

However, since pygit2.org brings up fairly accurate results for a search
on »list all branches«, I figured that the whole recipe isn't needed
anymore. Therefore delete it.
2015-01-05 10:27:43 +01:00
J. David Ibáñez
ceb40ecc52 Merge remote-tracking branch 'kinfoo/libssh2_docs' 2014-12-30 22:58:48 +01:00
Kevin KIN-FOO
e807ad43d7 Mentioning libssh2 in remote's pydoc 2014-12-30 16:34:15 +01:00
Kevin KIN-FOO
aff3a64e2d Mention libssh2 in installation#requirements
Fixes #456
2014-12-30 16:08:07 +01:00
Michael Sondergaard
df0e11726e Make pygit work in a frozen environment 2014-11-26 06:04:40 +01:00
J. David Ibáñez
beff871923 Minor styling 2014-11-12 10:21:47 +01:00
J. David Ibáñez
93be1f1910 Merge remote-tracking branch 'carlos/remote-collection' 2014-11-11 20:08:56 +01:00
Carlos Martín Nieto
b80103b017 Introduce RemoteCollection
This lets us look up remotes by name, which is not possible by just
returning the list of remotes.

Move remote creation to Repostiory.remotes.create() and keep the old
Repository.create_remote() for compatibility, delegating to this new
way.

Existing code should keep working, but this moves us towards what we'd
need for a better interface in 0.22 which makes remote renaming and
deleting work with a name rather than an instance and would make sense
to exist as part of an Remote.remotes object.
2014-11-11 19:57:22 +01:00
J. David Ibáñez
b6f0bb0800 setup: minor cleanup 2014-11-11 13:03:25 +01:00
Philippe Ombredanne
6484ef1e37 Make the GPL exception explicit in setup.py
I think that is best to have that explicitly set there (and it should possibly be updated in Pypi too).
Thanks for this lib!
Cordially
Philippe
2014-11-11 12:05:08 +01:00
Carlos Martín Nieto
11eea2d574 Get rid of allocfmt()
It is not possible to know how we can free the results of this
allocation, so we shouldn't be using this function.

We have a convention of returning Oid objects in pygit2, so let's keep
to that in these places.
2014-11-09 12:10:45 +01:00
Holger Frey
d4fc7010b3 Added installing on OS X 2014-11-09 10:39:07 +01:00
J. David Ibáñez
21e2102e7c Get ready for 0.21.4 release v0.21.4 0.21.4 2014-11-04 17:49:43 +01:00
J. David Ibáñez
316d5af2d1 Write changelog for upcoming 0.21.4 release 2014-11-03 18:58:15 +01:00
J. David Ibáñez
cb310316bf docs: fix build errors in the blame chapter 2014-11-03 18:53:38 +01:00
Carlos Martín Nieto
ab52904c5d Merge branch 'push-callback' 2014-11-03 13:27:53 +01:00
chengyuhang
45be961d60 set remote callback before push 2014-11-03 13:27:33 +01:00
J. David Ibáñez
1f0466fe49 Merge remote-tracking branch 'carlos/merge-commits' 2014-10-31 10:28:08 +01:00
J. David Ibáñez
8e933c8019 issue#441: change modulename to include hash of source
This should make it work both for users and developers.
2014-10-30 19:41:25 +01:00
J. David Ibáñez
94f650a41d Fix (again) the chicken-and-egg problem with cffi
Broken with previous commits :)
2014-10-30 17:59:38 +01:00
J. David Ibáñez
a9fa063de3 setup: remove old 'include' from include_dirs 2014-10-30 17:19:11 +01:00
Carlos Martín Nieto
bc8b29b4f3 Repository: allow passing a favor option to merge_commits
I've gone with taking a string and converting it because the depth of
the namespacing in the libgit2 name is rather large and we don't care
about the global namespace that C has; and this also lets us pass the
same as the '-X' option to git-merge.
2014-10-30 16:21:22 +01:00
Carlos Martín Nieto
3b27e16d08 Add Repository.merge_commits()
This allows you to merge arbitrary commits, returning an index, which is
useful when dealing with bare repos in which we want to merge.
2014-10-30 15:04:51 +01:00
J. David Ibáñez
7653d12c72 docs: review install section 2014-10-30 13:45:54 +01:00
J. David Ibáñez
01067cb77f Make cffi extension name to be constant
This should fix issue #441
2014-10-29 12:33:02 +01:00
J. David Ibáñez
93dd545069 Fix import error introduced in previous commit 2014-10-29 12:05:19 +01:00
J. David Ibáñez
e325c51203 Refactor code to get the path to libgit2 2014-10-28 16:31:53 +01:00
J. David Ibáñez
6bb2b369fa Merge remote-tracking branch 'wking/instaleld-typo' 2014-10-28 09:25:42 +01:00
J. David Ibáñez
7daa95a3a5 Merge remote-tracking branch 'wking/install-filing-typo' 2014-10-28 09:23:52 +01:00
W. Trevor King
6677de82c2 docs/install: Fix 'instaleld' -> 'installed' typo 2014-10-27 21:36:06 -07:00
W. Trevor King
8ca75e2744 docs/install: Fix 'filling un' -> 'filing a' typo 2014-10-27 21:31:55 -07:00
W. Trevor King
05c570c3fc docs/working-copy: Replace 'del index[path]' with index.remove(path)
Catch up with b12a5960 (Remove "del index[xxx]" from the API,
2013-05-02).
2014-10-27 21:03:37 -07:00
J. David Ibáñez
ecba70198f Test against libgit2 v0.21.2 2014-10-27 18:16:05 +01:00
J. David Ibáñez
54720c4f01 Merge remote-tracking branch 'wking/default-signature-attribute' 2014-10-27 13:20:10 +01:00
W. Trevor King
120fdedb5a docs/merge: default_signature is an attribute, not a method
Avoid:

  >>> repo.default_signature()
  Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
  TypeError: '_pygit2.Signature' object is not callable
2014-10-26 16:36:34 -07:00