config.py 273 B

12345678910111213
  1. #!/usr/bin/python
  2. # Read the config file for a git repository.
  3. #
  4. # Example usage:
  5. # python examples/config.py
  6. from dulwich.repo import Repo
  7. repo = Repo(".")
  8. config = repo.get_config()
  9. print(config.get("core", "filemode"))
  10. print(config.get(("remote", "origin"), "url"))