Questions tagged [pygit2]

Pygit2 is a set of Python bindings to the libgit2 shared library.

Pygit2 is a set of Python bindings to the libgit2 shared library, libgit2 implements the core of Git. Pygit2 works with Python 2.6, 2.7, 3.1, 3.2 and 3.3

Pygit2 links:

82 questions
0
votes
1 answer

Create a branch on a remote repository with pygit2

I am using pygit2 to create a branch on a remote repository. If it was in a local repository i would've used : repo=pygit2.Repository(repo_url) repo.create_branch('branch1', repo.head.get_object(),…
mohamed wael thabet
  • 195
  • 2
  • 4
  • 12
0
votes
1 answer

Update TreeEntry multiple levels deep in pygit2

Having trouble figuring out how to update an entry which is multiple levels deep. My example below is trying to update the file at test/hist/out, but it also deletes all other files from test/hist/. The TreeBuilder constructor doesnt accept…
Scott
  • 4,070
  • 3
  • 21
  • 16
0
votes
1 answer

How to checkout a revision by SHA-1 hash with pygit2?

It is seems that Repository.checkout can only checkout a referenece. Can we checkout any revision in the repo by SHA1-hash? equivalent to "svn checkout -r" in subversion system
user3196254
  • 115
  • 1
  • 6
0
votes
1 answer

libgit2 / pygit2 is there a way to do an update-server-info?

I need to prepare a repo for access from an HTTP server. To do seem it seems I need to run git update-server-info on the repo which updates some files that make it accessible over a dumb HTTP server. I am using Pygit2 / Libgit2 to create the repo. …
Duke Dougal
  • 24,359
  • 31
  • 91
  • 123
0
votes
1 answer

What is the difference between Repository.checkout() and Repository.checkout_head() in pygit2?

When pulling and integrating changes from remote with pygit2, the last step is to checkout using Repository.checkout() or Repository.checkout_head(). Which to use? Both of these take a checking out strategy as an argument. Now there are a couple…
avck
  • 3,535
  • 3
  • 26
  • 38
0
votes
1 answer

Move tag to other commit

While I can imagine to e.g. delete the tag via Reference.delete and then to recreate it anew (on the other commit), I wonder what the "official" way of moving a tag in pygit2 is.
abergmeier
  • 13,224
  • 13
  • 64
  • 120
-1
votes
1 answer

Using pygit2's discover_repository to locate multiple repositories in a directory

I have a project in which I need to access a (local) directory of bare git repositories in order to get specific items from their history. I need a function which will iterate through the directory and do something like: repo =…
DJGrandpaJ
  • 571
  • 3
  • 7
  • 20
1 2 3 4 5
6