File: config.py

package info (click to toggle)
dulwich 0.9.7-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 2,392 kB
  • ctags: 3,088
  • sloc: python: 18,874; ansic: 835; makefile: 153; sh: 2
file content (13 lines) | stat: -rw-r--r-- 273 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/python
# Read the config file for a git repository.
#
# Example usage:
#  python examples/config.py

from dulwich.repo import Repo

repo = Repo(".")
config = repo.get_config()

print(config.get("core", "filemode"))
print(config.get(("remote", "origin"), "url"))