File: config.py

package info (click to toggle)
dulwich 1.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 7,388 kB
  • sloc: python: 99,991; makefile: 163; sh: 67
file content (15 lines) | stat: -rw-r--r-- 332 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/python
# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later

# 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"))