Skip to content

Fix git issue #633

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
Nov 8, 2024
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- Fixed improper encoding of unicode characters in commit messages (#627)
- Creating a new branch now reports the error if uncommitted changes conflict (#624)
- Fix Configure erroring out if git isn't found (#632)

## [2.7.0] - 2024-11-04

Expand Down
6 changes: 0 additions & 6 deletions cls/SourceControl/Git/API.cls
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ ClassMethod Configure()
set gitExists = ##class(SourceControl.Git.Utils).GitBinExists(.version)
set gitBinPath = ##class(SourceControl.Git.Utils).GitBinPath(.isDefault)

// Make sure they are using an appropriate git version
if (+$PIECE(version,"version ",2))<2.31 {
write !!, "WARNING: You are using an older version of git which is not compatible with git-source-control. Please upgrade to git version 2.31.0 or greater to continue"
write !!, "Cancelling git-source-control configuration..."
quit
}
if gitExists && isDefault {
// Note: version starts with "git version"
write !,version," is available via PATH. You may enter a path to a different version if needed."
Expand Down
6 changes: 6 additions & 0 deletions cls/SourceControl/Git/Settings.cls
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,12 @@ ClassMethod Configure() As %Boolean [ CodeMode = objectgenerator ]
do %code.WriteLine(" set status = inst.ConfigureBinPath(.value)")
do %code.WriteLine(" if (status) { set valid = 1 }")
do %code.WriteLine(" }")
do %code.WriteLine(" set gitExists = ##class(SourceControl.Git.Utils).GitBinExists(.version)")
do %code.WriteLine(" if (+$PIECE(version,""version "",2))<2.31 && gitExists{")
do %code.WriteLine(" write !!, ""WARNING: You are using an older version of git which is not compatible with git-source-control. Please upgrade to git version 2.31.0 or greater to continue""")
do %code.WriteLine(" write !!, ""Cancelling git-source-control configuration...""")
do %code.WriteLine(" quit")
do %code.WriteLine(" }")
} elseif ((propertyDef) && (propertyDef.Name = "basicMode")) {
set basicModePromptFlag = defaultPromptFlag + $$$MatchExactArrayMask + $$$InitialDisplayMask
do %code.WriteLine(" set list(1) = ""Yes""")
Expand Down
3 changes: 1 addition & 2 deletions cls/SourceControl/Git/Utils.cls
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ClassMethod TempFolder() As %String

ClassMethod DefaultTempFolder() As %String
{
quit $get(@..#Storage@("settings","namespaceTemp"),..DefaultTemp()_$translate($znspace,"%")_..#Slash)
quit $get(@..#Storage@("settings","namespaceTemp"),..DefaultTemp()_..#Slash_$translate($znspace,"%")_..#Slash)
}

ClassMethod MappingsNode() As %String [ CodeMode = expression ]
Expand Down Expand Up @@ -2944,4 +2944,3 @@ ClassMethod InDefaultBranchBasicMode() As %Boolean
}

}

Loading