Skip to content

Commit eba6df6

Browse files
authored
Merge pull request #682 from intersystems/issue-656
Commit settings
2 parents a640718 + 5ba805e commit eba6df6

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.9.1] - Unreleased
9+
10+
### Fixed
11+
- Embedded Git commits settings when cloning empty repo to avert any issues
12+
813
## [2.9.0] - 2025-01-09
914

1015
### Added

cls/SourceControl/Git/Settings.cls

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -448,6 +448,15 @@ Method OnAfterConfigure() As %Boolean
448448
$$$ThrowOnError(workMgr.WaitForComplete())
449449
// export settings file without committing
450450
$$$ThrowOnError(..SaveWithSourceControl())
451+
452+
// Empty repo breaks Embedded Git, commit the settings file
453+
do ##class(SourceControl.Git.Utils).RunGitCommandWithInput("log",,.errStream,.outStream)
454+
do errStream.Rewind()
455+
if (errStream.Read() [ "does not have any commits yet") {
456+
w !,"Cloned Empty Repository, committing initial source control settings",!
457+
$$$ThrowOnError(##class(SourceControl.Git.Utils).AddToSourceControl(##class(SourceControl.Git.Settings.Document).#INTERNALNAME))
458+
$$$ThrowOnError(##class(SourceControl.Git.Utils).Commit(##class(SourceControl.Git.Settings.Document).#INTERNALNAME,"initial commit"))
459+
}
451460
}
452461
}
453462
}

module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Document name="git-source-control.ZPM">
44
<Module>
55
<Name>git-source-control</Name>
6-
<Version>2.9.0</Version>
6+
<Version>2.9.1</Version>
77
<Description>Server-side source control extension for use of Git on InterSystems platforms</Description>
88
<Keywords>git source control studio vscode</Keywords>
99
<Packaging>module</Packaging>

0 commit comments

Comments
 (0)