1152 Commits

Author SHA1 Message Date
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
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
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