14 Commits

Author SHA1 Message Date
J. David Ibáñez
6939b9b203 Fix indent error 2015-06-16 20:06:29 +02:00
J. David Ibáñez
e46119838b Merge remote-tracking branch 'rmoehn/cherry-pick-cleanup' 2015-05-03 11:37:57 +02:00
Carlos Martín Nieto
5b50579790 Add a recipe for git clone --mirror
It's not necessarily obvious how to perform a mirror, so add a recipe
which tells what git does as well as provide example code of how to
perform the same steps in pygit2.
2015-04-28 19:53:39 +02:00
Richard Möhn
654e4bf56f Cherry-pick recipe: clean up after picking
In b3025e3fe I had written that when following my recipe, the repository
remains in cherry-picking mode afterwards. In issue #516 I was told that
Repository.state_cleanup() is needed to correct that. Therefore add it
to the recipe.

Also add a note near the documentation for cherry-pick, so that nobody
will overlook this again. Apparently there are other times when you need
to do Repository.state_cleanup() as well, but it's not documented, I
don't know when and I don't want to take the time and find out. So leave
it at that for now.
2015-04-25 14:49:48 +09:00
Richard Möhn
b3025e3fe1 Add git-cherry-pick recipes
Add the way that worked for me. Not sure if it is idiomatic. When doing
the convenience-mode cherry-pick, the repo remains in cherry-picking
mode afterwards. I've already added an issue for this.
2015-04-22 17:14:45 +09: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
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
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
92547db18d docs: clarify git-init recipe
Fixes #336
2014-02-11 22:07:05 +01:00
Carlos Martín Nieto
1cc112c32f docs: adjust to recent changes
It seems I have been forgetting to update the documentation with the
last few  changes, so adjust to the oid -> id renaming and add missing
attributes to the listings.
2014-01-25 04:25:42 +01:00
Andrew Chin
d5c0a23630 Doc fixes: change head.oid to head.target in examples 2013-09-01 12:58:55 -04:00
Jiunn Haur Lim
38bd4c065d restructured recipes 2013-07-05 20:14:33 -04:00