From debc5c13a68b1e25f8497f106cd2f472b43a7f6b Mon Sep 17 00:00:00 2001 From: Matthew Thompson Date: Thu, 28 Apr 2022 13:10:39 -0400 Subject: [PATCH] Fixes #228. Add typechange support --- CHANGELOG.md | 6 ++++++ mepo.d/repository/git.py | 9 +++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ed6ecc6..3312729 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Removed +## [1.44.0] - 2022-04-28 + +### Fixed + +- Add support for typechange in `mepo status` + ## [1.43.0] - 2022-04-18 ### Fixed diff --git a/mepo.d/repository/git.py b/mepo.d/repository/git.py index b22cc2c..4c6f5b4 100644 --- a/mepo.d/repository/git.py +++ b/mepo.d/repository/git.py @@ -222,6 +222,8 @@ def check_status(self, ignore_permissions=False): verbose_status = colors.RED + "modified, not staged" + colors.RESET elif short_status == ".A": verbose_status = colors.RED + "added, not staged" + colors.RESET + elif short_status == ".T": + verbose_status = colors.RED + "typechange, not staged" + colors.RESET elif short_status == "D.": verbose_status = colors.GREEN + "deleted, staged" + colors.RESET @@ -229,6 +231,8 @@ def check_status(self, ignore_permissions=False): verbose_status = colors.GREEN + "modified, staged" + colors.RESET elif short_status == "A.": verbose_status = colors.GREEN + "added, staged" + colors.RESET + elif short_status == "T.": + verbose_status = colors.GREEN + "typechange, staged" + colors.RESET elif short_status == "MM": verbose_status = colors.GREEN + "modified, staged" + colors.RESET + " with " + colors.RED + "unstaged changes" + colors.RESET @@ -240,6 +244,11 @@ def check_status(self, ignore_permissions=False): elif short_status == "AD": verbose_status = colors.GREEN + "added, staged" + colors.RESET + " but " + colors.RED + "deleted, not staged" + colors.RESET + elif short_status == "TM": + verbose_status = colors.GREEN + "typechange, staged" + colors.RESET + " with " + colors.RED + "unstaged changes" + colors.RESET + elif short_status == "TD": + verbose_status = colors.GREEN + "typechange, staged" + colors.RESET + " but " + colors.RED + "deleted, not staged" + colors.RESET + elif short_status == "R.": verbose_status = colors.GREEN + "renamed" + colors.RESET + " as " + colors.YELLOW + new_file_name + colors.RESET elif short_status == "RM":