Skip to content

Commit settings #682

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ 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.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.9.1] - Unreleased

### Fixed
- Embedded Git commits settings when cloning empty repo to avert any issues

## [2.9.0] - 2025-01-09

### Added
Expand Down
9 changes: 9 additions & 0 deletions cls/SourceControl/Git/Settings.cls
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,15 @@ Method OnAfterConfigure() As %Boolean
$$$ThrowOnError(workMgr.WaitForComplete())
// export settings file without committing
$$$ThrowOnError(..SaveWithSourceControl())

// Empty repo breaks Embedded Git, commit the settings file
do ##class(SourceControl.Git.Utils).RunGitCommandWithInput("log",,.errStream,.outStream)
do errStream.Rewind()
if (errStream.Read() [ "does not have any commits yet") {
w !,"Cloned Empty Repository, committing initial source control settings",!
$$$ThrowOnError(##class(SourceControl.Git.Utils).AddToSourceControl(##class(SourceControl.Git.Settings.Document).#INTERNALNAME))
$$$ThrowOnError(##class(SourceControl.Git.Utils).Commit(##class(SourceControl.Git.Settings.Document).#INTERNALNAME,"initial commit"))
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<Document name="git-source-control.ZPM">
<Module>
<Name>git-source-control</Name>
<Version>2.9.0</Version>
<Version>2.9.1</Version>
<Description>Server-side source control extension for use of Git on InterSystems platforms</Description>
<Keywords>git source control studio vscode</Keywords>
<Packaging>module</Packaging>
Expand Down
Loading