1363 Commits

Author SHA1 Message Date
Patrick Steinhardt
367084e3c1 Implement merging of index entries.
This allows us to generate a textual diff of conflicting files in
bare repositories by performing a merge on the index followed by
repo.merge_file_from_index on the resulting index entries.
2015-03-11 16:08:13 +01:00
J. David Ibáñez
50a70086bf Merge remote-tracking branch 'pks/submodules' 2015-03-09 19:06:44 +01:00
Patrick Steinhardt
9a4e002864 Fix build error with Python3 due to PyString_FromFormat. 2015-03-09 14:18:59 +01:00
Patrick Steinhardt
71ca619e26 Fully implement Submodule type in C. 2015-03-09 13:27:12 +01:00
Masud Rahman
38b1975991 blob_fromiobase: addresses review comments. 2015-03-08 00:09:20 -05:00
Kaarel Kitsemets
2d3f9d8e55 Added info about pkg-config being an optional requirement 2015-03-07 12:44:32 +02:00
Patrick Steinhardt
d35ecf945a Add tests for submodules. 2015-03-06 17:48:29 +01:00
Patrick Steinhardt
86c51eadbf Fix issues with submodules regarding refcounting. 2015-03-06 17:47:08 +01:00
Patrick Steinhardt
404645042b Add Submodule type. 2015-03-04 14:10:41 +01:00
kitsemets
ef67c36d8c docs/install.rst: added pkg-config as a dependency for building libgit2. Without pkg-config it is not possible to build libgit2 with ssh support. 2015-02-26 16:00:27 +02:00
J. David Ibáñez
bc668751a4 Fix type check in Diff_getitem
Fixes issue #495
2015-02-20 17:14:22 +01:00
J. David Ibáñez
adb351f7b3 Show at least git error code when no git error message is available
Should help resolving issue #494
2015-02-20 11:35:10 +01:00
J. David Ibáñez
fbb11775a3 Update changelog 2015-02-14 21:27:34 +01:00
J. David Ibáñez
c7609efc4b Merge remote-tracking branch 'rnicoll/cherrypick' 2015-02-14 20:27:17 +01:00
J. David Ibáñez
82d5214321 Merge remote-tracking branch 'rmoehn/master' 2015-02-13 16:30:54 +01:00
Ross Nicoll
c91fdf1d21
Add support for cherrypick() 2015-02-13 12:52:03 +00:00
Richard Möhn
1cb62ab578 git-show recipe: Add the easy Python 3 way
As @jdavid pointed out, Python 3 already provides a tzinfo subclass for
fixed UTC offsets. Incorporate this in the recipe. Leave the old code
with the self-made class, since many people are working with Python 2
and it is harder to find out there.
2015-02-13 13:46:41 +01:00
Richard Möhn
69f539851b Clarify comments in git-show recipe 2015-02-13 09:03:16 +01:00
J. David Ibáñez
3d896769d0 New DiffLine
Comes from PR #346

One difference, DiffLine.origin is a T_CHAR instead of T_OBJECT
2015-02-12 16:56:34 +01:00
J. David Ibáñez
7130df3a5e Get back iter(Blame)
Was lost in commit cd0842592
2015-02-12 13:02:04 +01:00
J. David Ibáñez
94be744ba6 docs: remove reference to LIBGIT2 in OS X notes
As disscussed in PR #448
2015-02-12 09:32:58 +01:00
J. David Ibáñez
40946cd795 Merge remote-tracking branch 'holgi/master' 2015-02-12 09:32:18 +01:00
Richard Möhn
2b2beb8094 Correct git-show recipe
Make the diff generation more idiomatic and fix the assembling of the
timestamp. git-show normally prints the author time, so use this instead
of the commit time. Also fix how tzinfo is obtained. Of course we have
to use the author's time zone and not some fixed one as I had written
before.
2015-02-12 09:08:24 +01:00
Richard Möhn
c87d28c9a8 Update git-show recipe
I couldn't get the diff as shown in the git-show recipe. Therefore
update it to what I think it should be. Maybe there is a better way.

Also add a section on how to assemble a git show-like message. It took
me quite some searching in the Python docs to find out how to do it,
especially the date and time part. So this might save people time. I
wanted to add something that gives me a git show --stat equivalent, but
couldn't figure it out.
2015-02-11 18:00:00 +01:00
J. David Ibáñez
d64dd15bd2 Merge remote-tracking branch 'carlos/merge-trees' 2015-02-10 09:34:49 +01:00
Masud Rahman
9cce003efe Implements 'Repository.create_blob_fromiobase'.
This commit allows blobs to be constructed from implementatons of the
'RawIOBase' ABC.  This allows any conformant stream implementation to be added
as a blob.

This is useful in the case where the contents of the blob would be too large to
create from memory (as 'create_blob_fromstring' allows) and avoids having to
write the data to disk (as 'create_blob_fromworkdir' allows).  The latter
operation is especially useful when reading data from a network socket, since
it avoids having to first commit all the data to disk.
2015-02-10 01:28:23 -05:00
Carlos Martín Nieto
d4da228c0e Add documentation for merge_commits() and merge_trees() 2015-02-09 21:25:33 +01:00
Carlos Martín Nieto
fcd4b9446b Introduce Repository.merge_trees()
This is the function which does the work for Repository.merge_commits()
and allows us more direct control over which trees we want to merge,
including trees which do not belong to commits.
2015-02-09 21:21:28 +01:00
J. David Ibáñez
fa380c0adb Merge remote-tracking branch 'gandalf/archive_enh'
Conflicts:
	pygit2/repository.py
2015-02-07 20:35:45 +01:00
J. David Ibáñez
718a2df1d5 Fix building the docs 2015-02-07 08:37:41 +01:00
J. David Ibáñez
30e57e13e3 Merge remote-tracking branch 'carlos/ahead-behind' 2015-02-07 08:27:26 +01:00
Carlos Martín Nieto
0ba17a5b46 Safer handling of string arrays
We need to keep hold of the strings which we create. We must also hold
on to the array of strings which we assing to our git_strarray.

We were not doing the latter, which meant that our strings may have been
freed too early, leaving us with with memory access errors (though often
not leading to a crash due to the custom allocator in python).

As we need to keep hold of two/three pieces of information, this looks
like a good place to introduce a context manager. This allows us to
keep these pointers alive without burdening the call sites with a return
of multiple objects they have no use for.
2015-02-06 03:51:05 +01:00
Carlos Martín Nieto
4709cae1a1 Add Repository.ahead_behind()
This lets us ask how many diverging commits each side of two histories
have.
2015-02-06 01:26:26 +01:00
Carlos Martín Nieto
1361b2cce9 Add Repository.expand_id()
As we allow users of the library to use short strings, we must expand
them. This is however only available through a function in C. Expose
that function from the repository to allow python code to get a full id
from a short hex string.
2015-02-06 01:17:19 +01:00
J. David Ibáñez
7f21f6eb63 Expose the pygit2.GIT_REPOSITORY_INIT_* constants
Fixes #483
2015-02-01 10:53:19 +01:00
Alok Singhal
f5a5dfc18a Use "prefix" instead of "root_path" in write_archive 2015-01-30 10:15:08 -08:00
J. David Ibáñez
961d007b02 Patch.line_stats replaces .additions and .deletions
Comes from PR #346
2015-01-30 17:56:46 +01:00
J. David Ibáñez
909e03d8fc New DiffDelta and DiffFile
Comes from PR #346
2015-01-29 18:34:47 +01:00
Alok Singhal
3ee1c798b2 Add an option to specify root path when creating archives 2015-01-29 08:46:50 -08:00
Alok Singhal
9771adf862 Fix handling of symlinks in write_archive(). 2015-01-29 08:35:27 -08:00
J. David Ibáñez
8881b75aaa internal: split patch.c from diff.c
Comes from PR #346
2015-01-26 19:02:28 +01:00
J. David Ibáñez
e7fdaf2510 Fix link to travis image (use master) 2015-01-23 23:19:13 +01:00
J. David Ibáñez
061961f119 Rename pygit2.Hunk to pygit2.DiffHunk
Comes from PR #346
2015-01-23 13:38:13 +01:00
J. David Ibáñez
c62a79cf81 Start changelog for future 0.22.1 release 2015-01-23 13:37:27 +01:00
J. David Ibáñez
8a6e61551c Merge remote-tracking branch 'Sheeo/master' 2015-01-19 13:56:32 +01:00
J. David Ibáñez
126308403b Get ready to release v0.22.0 0.22.0 v0.22.0 2015-01-16 16:35:19 +01:00
J. David Ibáñez
9da91e554d Changelog for upcomming v0.22.0 release 2015-01-16 13:52:15 +01:00
J. David Ibáñez
beaaca7f63 Fix type of RefLogEntry.oid_old and RefLogEntry.oid_new
This was left from PR #449
2015-01-16 12:39:16 +01:00
J. David Ibáñez
b538163536 Merge remote-tracking branch 'carlos/development'
Conflicts:
	pygit2/remote.py
2015-01-16 11:16:02 +01:00
J. David Ibáñez
9c9b925da8 Revert "Mentioning libssh2 in remote's pydoc"
This reverts commit e807ad43d725da06bfc34187b387270baea74887.
2015-01-16 10:24:06 +01:00