gitbolt 0.0.0.dev12__tar.gz → 0.0.0.dev13__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.
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/PKG-INFO +1 -1
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/pyproject.toml +1 -1
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/__init__.py +0 -1
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/base.py +16 -9
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/impl/simple.py +9 -8
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt.egg-info/PKG-INFO +1 -1
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/LICENSE +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/README.md +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/setup.cfg +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/_internal_init.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/add.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/base.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/constants.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/exceptions.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/__init__.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/_internal_init.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/add.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/constants.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/exceptions.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/impl/__init__.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/ls_tree.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/runner/__init__.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/runner/base.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/runner/simple_impl.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/utils.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/ls_tree.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/models.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/py.typed +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/pytest_plugin.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/utils.py +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt.egg-info/SOURCES.txt +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt.egg-info/dependency_links.txt +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt.egg-info/entry_points.txt +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt.egg-info/requires.txt +0 -0
- {gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitbolt
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev13
|
|
4
4
|
Summary: Fast, flexible and type-safe Git commands in Python.
|
|
5
5
|
Author-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
|
|
6
6
|
Maintainer-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
|
|
@@ -40,7 +40,7 @@ class GitCommand(Git, ABC):
|
|
|
40
40
|
"""
|
|
41
41
|
self.runner: GitCommandRunner = runner
|
|
42
42
|
self._main_cmd_opts: GitOpts = {}
|
|
43
|
-
self._env_vars: GitEnvVars =
|
|
43
|
+
self._env_vars: GitEnvVars | None = None
|
|
44
44
|
|
|
45
45
|
# region build_main_cmd_args
|
|
46
46
|
def build_main_cmd_args(self) -> list[str]:
|
|
@@ -216,7 +216,7 @@ class GitCommand(Git, ABC):
|
|
|
216
216
|
# endregion
|
|
217
217
|
|
|
218
218
|
# region build_git_envs
|
|
219
|
-
def build_git_envs(self) -> dict[str, str]:
|
|
219
|
+
def build_git_envs(self) -> dict[str, str] | None:
|
|
220
220
|
"""
|
|
221
221
|
Terminal operation to build and return effective Git environment variables
|
|
222
222
|
from the merged ``GitEnvVars`` object.
|
|
@@ -226,16 +226,22 @@ class GitCommand(Git, ABC):
|
|
|
226
226
|
|
|
227
227
|
:return: A cleaned and normalized GitEnvVars dict suitable for use in subprocesses.
|
|
228
228
|
"""
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
if self._env_vars is None:
|
|
230
|
+
return None
|
|
231
|
+
else:
|
|
232
|
+
env: dict[str, str] = {}
|
|
233
|
+
for key, val in self._env_vars.items():
|
|
234
|
+
if not_none_not_unset(val):
|
|
235
|
+
env[key] = str(val)
|
|
236
|
+
return env
|
|
234
237
|
|
|
235
238
|
@override
|
|
236
239
|
def git_envs_override(self, **overrides: Unpack[GitEnvVars]) -> Self:
|
|
237
240
|
_git_cmd = self.clone()
|
|
238
|
-
|
|
241
|
+
if self._env_vars:
|
|
242
|
+
_env_vars = merge_git_envs(overrides, self._env_vars)
|
|
243
|
+
else:
|
|
244
|
+
_env_vars = overrides
|
|
239
245
|
_git_cmd._env_vars = _env_vars
|
|
240
246
|
return _git_cmd
|
|
241
247
|
|
|
@@ -582,7 +588,8 @@ class UncheckedSubcmd(GitSubcmdCommand, RootDirOp, Protocol):
|
|
|
582
588
|
envs_vars = self.underlying_git.build_git_envs()
|
|
583
589
|
another_supplied_env = subprocess_run_kwargs.pop("env", None)
|
|
584
590
|
if another_supplied_env:
|
|
585
|
-
envs_vars
|
|
591
|
+
if envs_vars is not None:
|
|
592
|
+
envs_vars.update(another_supplied_env)
|
|
586
593
|
cwd = subprocess_run_kwargs.pop("cwd", self.root_dir)
|
|
587
594
|
capture_output = subprocess_run_kwargs.pop("capture_output", True)
|
|
588
595
|
check = subprocess_run_kwargs.pop("check", True)
|
|
@@ -266,7 +266,8 @@ class CLISimpleGitCommand(SimpleGitCommand):
|
|
|
266
266
|
):
|
|
267
267
|
"""
|
|
268
268
|
:param opts: main git cli options.
|
|
269
|
-
:param envs: main git cli env vars.
|
|
269
|
+
:param envs: main git cli env vars. Not supplying any env vars (default behavior: ``None``) simply supplies all
|
|
270
|
+
the env vars to the underlying runner.
|
|
270
271
|
:param prefer_cli: cli opts and envs will be given priority over programmatically set opts and envs. Setting
|
|
271
272
|
this param to ``True`` will make cli opts and envs appear later in the opts and envs strings which will
|
|
272
273
|
make them override previously programmatically set opts and envs.
|
|
@@ -293,13 +294,13 @@ class CLISimpleGitCommand(SimpleGitCommand):
|
|
|
293
294
|
return super().build_main_cmd_args()
|
|
294
295
|
|
|
295
296
|
@override
|
|
296
|
-
def build_git_envs(self) -> dict[str, str]:
|
|
297
|
-
if self._cmd_cli_envs:
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
297
|
+
def build_git_envs(self) -> dict[str, str] | None:
|
|
298
|
+
if self._cmd_cli_envs is None:
|
|
299
|
+
return super().build_git_envs()
|
|
300
|
+
if self.prefer_cli:
|
|
301
|
+
return (super().build_git_envs() or {}) | self._cmd_cli_envs
|
|
302
|
+
else:
|
|
303
|
+
return self._cmd_cli_envs | (super().build_git_envs() or {})
|
|
303
304
|
|
|
304
305
|
@override
|
|
305
306
|
def _subclass_clone(self) -> CLISimpleGitCommand:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gitbolt
|
|
3
|
-
Version: 0.0.0.
|
|
3
|
+
Version: 0.0.0.dev13
|
|
4
4
|
Summary: Fast, flexible and type-safe Git commands in Python.
|
|
5
5
|
Author-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
|
|
6
6
|
Maintainer-email: Suhas Krishna Srivastava <suhas.srivastava@vaastav.tech>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{gitbolt-0.0.0.dev12 → gitbolt-0.0.0.dev13}/src/gitbolt/git_subprocess/runner/simple_impl.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|