From 486a2c4b43a5b6c08d8a2ac2b6e724cd28dd0bbc Mon Sep 17 00:00:00 2001 From: Dong Zhou Date: Mon, 24 Jul 2023 00:50:38 -0400 Subject: [PATCH] fix unit tests --- gita/info.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gita/info.py b/gita/info.py index e84af35..ba92141 100644 --- a/gita/info.py +++ b/gita/info.py @@ -170,7 +170,12 @@ def has_stashed(flags: List[str], path) -> bool: """ # FIXME: this doesn't work for repos like worktrees, bare, etc p = Path(path) / ".git" / "logs" / "refs" / "stash" - return p.is_file() + got = False + try: + got = p.is_file() + except Exception: + pass + return got def get_commit_msg(prop: Dict[str, str]) -> str: