From 8a1f881ce35bde31241873c917ebe5f5d06058b1 Mon Sep 17 00:00:00 2001 From: Natalia Serrano Date: Thu, 24 Jul 2025 15:22:34 +0200 Subject: [PATCH] refs #2532 have GetGitData deal with the fact that .git may be a regular file --- CHANGELOG.md | 6 ++++++ ogclient/interfaceAdm/GetGitData | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7c3b20e..a9922f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.0.3] - 2025-07-24 + +### Fixed + +- Have GetGitData deal with the fact that .git may be a regular file + ## [1.0.2] - 2025-07-24 ### Changed diff --git a/ogclient/interfaceAdm/GetGitData b/ogclient/interfaceAdm/GetGitData index 63e431b..ba86037 100755 --- a/ogclient/interfaceAdm/GetGitData +++ b/ogclient/interfaceAdm/GetGitData @@ -23,8 +23,8 @@ ogEcho (['log', 'session'], None, f'{ogGlobals.lang.MSG_INTERFACE_START} {prog} mntpt = ogMount (dsk, par) git_dir = f'{mntpt}/.git' -if not os.path.isdir (git_dir): - ogRaiseError (['log', 'session'], ogGlobals.OG_ERR_FORMAT, f'"{git_dir}" no existe o no es un directorio') +if not os.path.exists (git_dir): + ogRaiseError (['log', 'session'], ogGlobals.OG_ERR_FORMAT, f'"{git_dir}" no existe') sys.exit (1) p = subprocess.run (['git', '--git-dir', git_dir, 'branch', '--show-current'], capture_output=True, text=True)