Skip to content

Commit

Permalink
Fix parsing of git version
Browse files Browse the repository at this point in the history
  • Loading branch information
PawelLipski committed Dec 24, 2019
1 parent 2d5c625 commit 8e0f5d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Release notes

## New in git-machete 2.12.6

- fixed: trailing parts of the output of `git --version` are now removed

## New in git-machete 2.12.5

- improved: validation of generated Debian packages
Expand Down
2 changes: 1 addition & 1 deletion git_machete/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '2.12.5'
__version__ = '2.12.6'
4 changes: 2 additions & 2 deletions git_machete/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -459,8 +459,8 @@ def edit():
def get_git_version():
global git_version
if not git_version:
git_version = tuple(map(int, popen_git("version").strip()
.replace("git version ", "").split(".")))
raw = re.search(r"\d+.\d+.\d+", popen_git("version")).group(0)
git_version = tuple(map(int, raw.split(".")))
return git_version


Expand Down

0 comments on commit 8e0f5d1

Please sign in to comment.