refs #2532 have GetGitData deal with the fact that .git may be a regular file

pull/101/head
Natalia Serrano 2025-07-24 15:22:34 +02:00
parent 9bbcfa6907
commit 8a1f881ce3
2 changed files with 8 additions and 2 deletions

View File

@ -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

View File

@ -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)