GitPython 3.1.48__tar.gz → 3.1.49__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. {gitpython-3.1.48 → gitpython-3.1.49/GitPython.egg-info}/PKG-INFO +1 -1
  2. {gitpython-3.1.48/GitPython.egg-info → gitpython-3.1.49}/PKG-INFO +1 -1
  3. gitpython-3.1.49/VERSION +1 -0
  4. {gitpython-3.1.48 → gitpython-3.1.49}/doc/source/changes.rst +11 -0
  5. {gitpython-3.1.48 → gitpython-3.1.49}/git/__init__.py +1 -1
  6. {gitpython-3.1.48 → gitpython-3.1.49}/git/config.py +22 -2
  7. gitpython-3.1.49/git/repo/fun.py +736 -0
  8. gitpython-3.1.48/VERSION +0 -1
  9. gitpython-3.1.48/git/repo/fun.py +0 -425
  10. {gitpython-3.1.48 → gitpython-3.1.49}/AUTHORS +0 -0
  11. {gitpython-3.1.48 → gitpython-3.1.49}/CHANGES +0 -0
  12. {gitpython-3.1.48 → gitpython-3.1.49}/CONTRIBUTING.md +0 -0
  13. {gitpython-3.1.48 → gitpython-3.1.49}/GitPython.egg-info/SOURCES.txt +0 -0
  14. {gitpython-3.1.48 → gitpython-3.1.49}/GitPython.egg-info/dependency_links.txt +0 -0
  15. {gitpython-3.1.48 → gitpython-3.1.49}/GitPython.egg-info/not-zip-safe +0 -0
  16. {gitpython-3.1.48 → gitpython-3.1.49}/GitPython.egg-info/requires.txt +0 -0
  17. {gitpython-3.1.48 → gitpython-3.1.49}/GitPython.egg-info/top_level.txt +0 -0
  18. {gitpython-3.1.48 → gitpython-3.1.49}/LICENSE +0 -0
  19. {gitpython-3.1.48 → gitpython-3.1.49}/MANIFEST.in +0 -0
  20. {gitpython-3.1.48 → gitpython-3.1.49}/README.md +0 -0
  21. {gitpython-3.1.48 → gitpython-3.1.49}/doc/.gitignore +0 -0
  22. {gitpython-3.1.48 → gitpython-3.1.49}/doc/Makefile +0 -0
  23. {gitpython-3.1.48 → gitpython-3.1.49}/doc/requirements.txt +0 -0
  24. {gitpython-3.1.48 → gitpython-3.1.49}/doc/source/conf.py +0 -0
  25. {gitpython-3.1.48 → gitpython-3.1.49}/doc/source/index.rst +0 -0
  26. {gitpython-3.1.48 → gitpython-3.1.49}/doc/source/intro.rst +0 -0
  27. {gitpython-3.1.48 → gitpython-3.1.49}/doc/source/quickstart.rst +0 -0
  28. {gitpython-3.1.48 → gitpython-3.1.49}/doc/source/reference.rst +0 -0
  29. {gitpython-3.1.48 → gitpython-3.1.49}/doc/source/roadmap.rst +0 -0
  30. {gitpython-3.1.48 → gitpython-3.1.49}/doc/source/tutorial.rst +0 -0
  31. {gitpython-3.1.48 → gitpython-3.1.49}/git/cmd.py +0 -0
  32. {gitpython-3.1.48 → gitpython-3.1.49}/git/compat.py +0 -0
  33. {gitpython-3.1.48 → gitpython-3.1.49}/git/db.py +0 -0
  34. {gitpython-3.1.48 → gitpython-3.1.49}/git/diff.py +0 -0
  35. {gitpython-3.1.48 → gitpython-3.1.49}/git/exc.py +0 -0
  36. {gitpython-3.1.48 → gitpython-3.1.49}/git/index/__init__.py +0 -0
  37. {gitpython-3.1.48 → gitpython-3.1.49}/git/index/base.py +0 -0
  38. {gitpython-3.1.48 → gitpython-3.1.49}/git/index/fun.py +0 -0
  39. {gitpython-3.1.48 → gitpython-3.1.49}/git/index/typ.py +0 -0
  40. {gitpython-3.1.48 → gitpython-3.1.49}/git/index/util.py +0 -0
  41. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/__init__.py +0 -0
  42. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/base.py +0 -0
  43. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/blob.py +0 -0
  44. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/commit.py +0 -0
  45. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/fun.py +0 -0
  46. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/submodule/__init__.py +0 -0
  47. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/submodule/base.py +0 -0
  48. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/submodule/root.py +0 -0
  49. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/submodule/util.py +0 -0
  50. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/tag.py +0 -0
  51. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/tree.py +0 -0
  52. {gitpython-3.1.48 → gitpython-3.1.49}/git/objects/util.py +0 -0
  53. {gitpython-3.1.48 → gitpython-3.1.49}/git/py.typed +0 -0
  54. {gitpython-3.1.48 → gitpython-3.1.49}/git/refs/__init__.py +0 -0
  55. {gitpython-3.1.48 → gitpython-3.1.49}/git/refs/head.py +0 -0
  56. {gitpython-3.1.48 → gitpython-3.1.49}/git/refs/log.py +0 -0
  57. {gitpython-3.1.48 → gitpython-3.1.49}/git/refs/reference.py +0 -0
  58. {gitpython-3.1.48 → gitpython-3.1.49}/git/refs/remote.py +0 -0
  59. {gitpython-3.1.48 → gitpython-3.1.49}/git/refs/symbolic.py +0 -0
  60. {gitpython-3.1.48 → gitpython-3.1.49}/git/refs/tag.py +0 -0
  61. {gitpython-3.1.48 → gitpython-3.1.49}/git/remote.py +0 -0
  62. {gitpython-3.1.48 → gitpython-3.1.49}/git/repo/__init__.py +0 -0
  63. {gitpython-3.1.48 → gitpython-3.1.49}/git/repo/base.py +0 -0
  64. {gitpython-3.1.48 → gitpython-3.1.49}/git/types.py +0 -0
  65. {gitpython-3.1.48 → gitpython-3.1.49}/git/util.py +0 -0
  66. {gitpython-3.1.48 → gitpython-3.1.49}/pyproject.toml +0 -0
  67. {gitpython-3.1.48 → gitpython-3.1.49}/requirements.txt +0 -0
  68. {gitpython-3.1.48 → gitpython-3.1.49}/setup.cfg +0 -0
  69. {gitpython-3.1.48 → gitpython-3.1.49}/setup.py +0 -0
  70. {gitpython-3.1.48 → gitpython-3.1.49}/test-requirements.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GitPython
3
- Version: 3.1.48
3
+ Version: 3.1.49
4
4
  Summary: GitPython is a Python library used to interact with Git repositories
5
5
  Home-page: https://github.com/gitpython-developers/GitPython
6
6
  Author: Sebastian Thiel, Michael Trier
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: GitPython
3
- Version: 3.1.48
3
+ Version: 3.1.49
4
4
  Summary: GitPython is a Python library used to interact with Git repositories
5
5
  Home-page: https://github.com/gitpython-developers/GitPython
6
6
  Author: Sebastian Thiel, Michael Trier
@@ -0,0 +1 @@
1
+ 3.1.49
@@ -2,6 +2,17 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ 3.1.49
6
+ ======
7
+
8
+ Save setting of configuration values,
9
+ which cuold be used to inject other more configuration.
10
+
11
+ Also more conforming `rev-parse` implementation.
12
+
13
+ See the following for all changes.
14
+ https://github.com/gitpython-developers/GitPython/releases/tag/3.1.49
15
+
5
16
  3.1.48
6
17
  ======
7
18
 
@@ -86,7 +86,7 @@ __all__ = [
86
86
  "to_hex_sha",
87
87
  ]
88
88
 
89
- __version__ = '3.1.48'
89
+ __version__ = '3.1.49'
90
90
 
91
91
  from typing import Any, List, Optional, Sequence, TYPE_CHECKING, Tuple, Union
92
92
 
@@ -882,6 +882,24 @@ class GitConfigParser(cp.RawConfigParser, metaclass=MetaParserBuilder):
882
882
  return str(value)
883
883
  return force_text(value)
884
884
 
885
+ def _value_to_string_safe(self, value: Union[str, bytes, int, float, bool]) -> str:
886
+ value_str = self._value_to_string(value)
887
+ if re.search(r"[\r\n\x00]", value_str):
888
+ raise ValueError("Git config values must not contain CR, LF, or NUL")
889
+ return value_str
890
+
891
+ @needs_values
892
+ @set_dirty_and_flush_changes
893
+ def set(
894
+ self,
895
+ section: str,
896
+ option: str,
897
+ value: Union[str, bytes, int, float, bool, None] = None,
898
+ ) -> None:
899
+ if value is not None:
900
+ value = self._value_to_string_safe(value)
901
+ return super().set(section, option, value)
902
+
885
903
  @needs_values
886
904
  @set_dirty_and_flush_changes
887
905
  def set_value(self, section: str, option: str, value: Union[str, bytes, int, float, bool]) -> "GitConfigParser":
@@ -902,9 +920,10 @@ class GitConfigParser(cp.RawConfigParser, metaclass=MetaParserBuilder):
902
920
  :return:
903
921
  This instance
904
922
  """
923
+ value_str = self._value_to_string_safe(value)
905
924
  if not self.has_section(section):
906
925
  self.add_section(section)
907
- self.set(section, option, self._value_to_string(value))
926
+ super().set(section, option, value_str)
908
927
  return self
909
928
 
910
929
  @needs_values
@@ -929,9 +948,10 @@ class GitConfigParser(cp.RawConfigParser, metaclass=MetaParserBuilder):
929
948
  :return:
930
949
  This instance
931
950
  """
951
+ value_str = self._value_to_string_safe(value)
932
952
  if not self.has_section(section):
933
953
  self.add_section(section)
934
- self._sections[section].add(option, self._value_to_string(value))
954
+ self._sections[section].add(option, value_str)
935
955
  return self
936
956
 
937
957
  def rename_section(self, section: str, new_name: str) -> "GitConfigParser":