Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

in 0.3.2 executing git commands using environment variables breaks #207

Copy link
Copy link
@electrofelix

Description

@electrofelix
Issue body actions

Recent release 0.3.2 contains a change to set the LC_MESSAGES=C for all git commands to ensure the error messages are consistent across systems. this breaks commands that use the environment to allow users to control behaviour.

To reproduce, clone the GitPython repo, checkout the current 0.3 branch and within execute the following command

PYTHONPATH=. python -c 'import os
import git
test = git.Git(".")
os.environ["GIT_EDITOR"] = "cat"
test.var("GIT_EDITOR")'

Output will be:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "git/cmd.py", line 240, in <lambda>
    return lambda *args, **kwargs: self._call_process(name, *args, **kwargs)
  File "git/cmd.py", line 536, in _call_process
    return self.execute(make_call(), **_kwargs)
  File "git/cmd.py", line 399, in execute
    raise GitCommandError(command, status, stderr_value)
git.exc.GitCommandError: 'git var GIT_EDITOR' returned exit status 128: fatal: Terminal is dumb, but EDITOR unset

This breaks https://github.com/stackforge/git-upstream usage of GitPython.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.