Skip to content

Commit

Permalink
do not import git globally
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelArbel committed Dec 1, 2024
1 parent 7e91803 commit 66970c5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Changes

## 1.0.2 (2024-09-19)
## 1.0.3 (2024-12-01)


### Bug fixes

- Make mlxp config file optional
- Do not import git globally


2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.2
1.0.3
8 changes: 3 additions & 5 deletions mlxp/version_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
import subprocess
from typing import Any, Dict

import git
from git.compat import defenc

from mlxp._internal._interactive_mode import _bcolors, _printc

IGNORE_UNTRACKED_MSG = _bcolors.FAIL + "Warning:" + _bcolors.ENDC + "There are untracked files! \n"
Expand Down Expand Up @@ -248,7 +245,8 @@ def _disp_uncommited_files(repo):


def _disp_untracked_files(repo):

import git
from git.compat import defenc
status = repo.git.status(porcelain=True, untracked_files=False, as_process=True)

prefix = "?? "
Expand All @@ -268,7 +266,7 @@ def _disp_untracked_files(repo):


def _get_git_repo():

import git
try:
repo = git.Repo(search_parent_directories=True)
except git.exc.InvalidGitRepositoryError as error:
Expand Down

0 comments on commit 66970c5

Please sign in to comment.