7 Commits

Author SHA1 Message Date
Nico von Geyso
682fb1fd13 merged create_reference and create_reference_symbolic and added force-Option
To be more pythonic: merged methods create_reference and create_reference_symbolic
and added force-Option. To make a new symbolic reference you have provide symbolic=True
as an additional parameter. If force=True references will although be overridden.
Otherwise an exception is raised if the references exists.

Examples:

  # normal reference
    repo.create_reference('refs/heads/foo', repo.head.hex)

  # override reference with new value
    repo.create_reference('refs/heads/foo', repo.head.hex, force=True)

  # symbolic reference
    repo.create_reference('refs/tags/foo', 'refs/heads/master', symbolic = True)
2012-10-09 13:13:36 +02:00
Alex Chamberlain
7e3b21ba55 Added Repository.create_blob_fromfile 2012-08-23 12:47:12 +01:00
J. David Ibáñez
6195491596 Add/update copyright header of each file
And update my email address.
2012-07-18 12:07:17 +02:00
Martin Lenders
e77d248713 Add back reference from Repository to Config 2012-06-08 18:34:54 +02:00
Nico von Geyso
e402d0e9eb added head-getter for Repository
You do not have to lookup and resolve the HEAD reference anymore if you simply want
the last commit. Repository has now a head-getter which combines all these steps.

example:
  repo = Repository('.')
  head = repo.head
  print(head.message)
2012-05-28 12:41:43 +02:00
Nico von Geyso
e7b5560590 Merge branch 'master' of https://github.com/libgit2/pygit2 into refactoring
Conflicts:
	pygit2.c
2012-05-25 17:37:25 +02:00
Nico von Geyso
6b1a281edc refactoring pygit2.c into several small files
The whole extension was organised in one big 3727 lines monster.
This refactoring is splitting these 3727 lines into several smaller files.
2012-05-25 14:07:44 +02:00