1074 Commits

Author SHA1 Message Date
Carlos Martín Nieto
fc0cdaebd6 Remote: add documentation for credentials 2014-03-26 14:03:29 +01:00
Carlos Martín Nieto
4c3c706cb9 Repository: don't jump to cleanup unecessarily
Until we have successfully borrowed the message, we have not used up any
resources, we can skip jumping to 'out' and we can return NULL
directly. This also avoid dereferencing an uninitialised 'tmessage'.
2014-03-26 12:37:28 +01:00
Carlos Martín Nieto
b49da53962 Introduce credentials 2014-03-26 12:10:24 +01:00
Thomas Kluyver
af2528418a More informative repr for Repository objects 2014-03-25 15:13:10 -07:00
Carlos Martín Nieto
87c8aef7d9 Settings: add documentation
The search_path attribute is now inside __init__() so it shows properly
in the generated documentation.
2014-03-24 01:44:36 +01:00
Carlos Martín Nieto
6bdb013592 settings: python 3.3 compat
Python 3.3 doesn't like us overriding properties in __slots__, so set it
to an empty list.
2014-03-24 01:43:40 +01:00
Carlos Martín Nieto
48ff3a8983 Create proxy object for libgit2 options
pygit2.settings proxies though the lower-level varargs option() via
getters and setters which provide a more natural abstraction.
2014-03-23 15:53:32 +01:00
Carlos Martín Nieto
ab44196730 Introduce libgit2 options
Allow setting and getting the mwindow size and search paths.
2014-03-23 15:23:42 +01:00
earl
0e4a27284f diff: Fix for memory leak in git_patch 2014-02-21 10:24:38 +01:00
J. David Ibáñez
0984c7fdba Merge remote-tracking branch 'rhodes/master' 2014-02-16 12:26:24 +01:00
Leonardo Rhodes
1a17256ee3 added unit test 2014-02-13 23:09:40 +01:00
J. David Ibáñez
e322a3a678 Silence a couple of valgrind warnings 2014-02-12 23:05:51 +01:00
Leonardo Rhodes
9223d75bb0 fixed wrong return value 2014-02-12 22:20:09 +01:00
J. David Ibáñez
7fd633239f Some coding-style fixes, like not using tabs 2014-02-12 22:11:10 +01:00
Leonardo Rhodes
1e6062932c Added git_add_all
Moved git strarray conversion to utils
2014-02-12 21:47:41 +01:00
J. David Ibáñez
9e6d33855c Merge remote-tracking branch 'ahren/fixup_v0.20.2' 2014-02-12 09:24:47 +01:00
Erik Meusel
db940931fa make remote.c build with VS compiler 2008 2014-02-12 07:46:53 +01:00
J. David Ibáñez
a794d66558 docs: document TreeBuilder.get
Fixes #302
2014-02-11 22:48:34 +01:00
J. David Ibáñez
92547db18d docs: clarify git-init recipe
Fixes #336
2014-02-11 22:07:05 +01:00
J. David Ibáñez
56a2f0f9a8 Merge remote-tracking branch 'carlos/object-peel' 2014-02-11 19:07:40 +01:00
Carlos Martín Nieto
b2cd25cf00 object: allow passing a type object to peel()
Allow usage of a python type instead of having to use the libgit2
constants.
2014-02-11 18:30:47 +01:00
Carlos Martín Nieto
de3dba668a object: implement peel()
This simplifies getting one type of object from a higher-level one as
well as accepting a commit-ish or tree-ish.
2014-02-11 18:30:47 +01:00
Carlos Martín Nieto
1f3c0170aa test: clean up
Remove the temporary files and directories we create as part of running
the test suite.
2014-02-11 17:53:31 +01:00
Devaev Maxim
fa7d24005b Fixed undefined symbol: PyLong_AsSize_t on PyPy 2014-02-07 17:11:06 +04:00
Carlos Martín Nieto
73170cc104 walk: make the sorting mode optional
Since the libgit2 has a default sorting method, which we also mention as
default in the documentation, there is no particular need to make the
user choose a sorting method when the order does not matter. We use
sorting NONE in that case.
2014-02-06 10:46:30 +01:00
J. David Ibáñez
140305e410 Get ready to release 0.20.2 v0.20.2 2014-02-04 22:26:46 +01:00
Carlos Martín Nieto
dcd5acc34e index entry: avoid extra copy 2014-02-04 12:53:45 +01:00
Carlos Martín Nieto
824ac672c1 remote: borrow the C string where possible 2014-02-04 12:53:45 +01:00
Carlos Martín Nieto
659749510f refspec: borrow the C string 2014-02-04 12:53:45 +01:00
Carlos Martín Nieto
c8a4027aff signature: borrow the name's C string 2014-02-04 12:53:45 +01:00
Carlos Martín Nieto
b4827ba081 repository: borrow C strings where possible 2014-02-04 12:53:45 +01:00
Carlos Martín Nieto
1c74676ed4 config: borrow the string for lookup and setting
We don't need our own copy of the string, so use the new borrowing
mechanism to use python's underlying string for the key to get/set.
2014-02-04 12:53:45 +01:00
Carlos Martín Nieto
74d091d609 utils: allow borrowing a C string
We don't always need our own copy of a C string; sometimes we just need
to parse it. Create py_str_borrow_c_str() which returns a char pointer
to python's internal value string, with which we can avoid an extra copy.
2014-02-04 12:53:45 +01:00
J. David Ibáñez
d7071b88cd Update copyright year 2014-02-04 08:02:12 +01:00
J. David Ibáñez
7b1310f31b docs: fix warnings 2014-02-04 07:52:58 +01:00
J. David Ibáñez
c04db1f66d Split the Refspec type to its own file 2014-02-04 07:25:00 +01:00
J. David Ibáñez
873b38bbc3 Update README 2014-02-03 22:39:58 +01:00
J. David Ibáñez
b95ee3758c Preparing release 2014-02-02 23:32:21 +01:00
J. David Ibáñez
977c315c21 Preparing for release 2014-02-02 15:07:47 +01:00
Alexander Bayandin
b9bf1175e2 Run tests on travis CI for pypy
Because #209 is done
2014-02-02 12:11:19 +03:00
J. David Ibáñez
6a8e7a97cb Merge remote-tracking branch 'carlos/index-add-entry' 2014-01-29 11:57:44 +01:00
Carlos Martín Nieto
f3f3d28637 Index: allow writing the tree to a particular repository
Take an optional repository in Index.write_tree() to serialize to a tree
into a particular repository's odb.
2014-01-29 11:46:53 +01:00
Carlos Martín Nieto
c43c320c3e Index: accept adding either a path or an IndexEntry
A path is only useful if we have the file on the worktree. Passing an
IndexEntry allows us to add an entry with arbitrary attributes.
2014-01-29 11:46:53 +01:00
Carlos Martín Nieto
f6389ee2c3 IndexEntry: make the attributes writable
When updating entries in an index, it is necessary to modify the
attributes of tree entries. make it possible to do so.
2014-01-29 11:46:53 +01:00
J. David Ibáñez
5a785ba976 Remove left over declaration of Remote_set_callbacks 2014-01-29 11:26:13 +01:00
XTao
f79ae6b421 Drop Remote_init. 2014-01-29 18:09:55 +08:00
Carlos Martín Nieto
d98a701477 IndexEntry: allow creation of this object
They are not required to belong to a particular index, so it should be
possible to create them at runtime in order to insert them.
2014-01-29 10:51:15 +01:00
Carlos Martín Nieto
9c95cb0560 IndexEntry: keep a copy of the underlying git_index_entry
The tree entries exist more or less independently of the index they were
retrieved from. The idea behind them is that they can be kept by a
binding without needing to refer to the original anymore, which may
disappear at any moment if the index is modified.

Keep a copy of the data in TreeEntry instead of pointing to the one
retrieved from the index, which is not safe to keep around.
2014-01-29 10:51:15 +01:00
XTao
5b4b7f39d5 Add wrap remote. 2014-01-29 15:14:57 +08:00
Carlos Martín Nieto
94e841bfb2 Remove useless constructors
The Reference, Branch, ConfigIter and Walker types were allowed to be created by the
user, but no constructor was set, and the default values are either
meaningless (in the case of Reference/Branch) or would cause a segfault
as soon as one tried to use them (ConfigIter and Walker).

Remove the constructor from these types, as they don't serve a purpose
and can only be used by mistake.
2014-01-28 18:35:56 +01:00