Skip to content

Commit 77f3d1a

Browse files
authored
Merge pull request #915 from intersystems/fix-generated-read-only
GetStatus correctly marks generated files read-only
2 parents c476e66 + 5a07c34 commit 77f3d1a

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
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.15.1] - Unreleased
9+
10+
## Fixed
11+
- Fixed issue where Generated Files Read-only option didn't entirely work for files not in source control (#712)
12+
813
## [2.15.0] - 2026-01-06
914

1015
### Added

cls/SourceControl/Git/Extension.cls

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ Method GetStatus(ByRef InternalName As %String, ByRef IsInSourceControl As %Bool
546546
}
547547
} else {
548548
// If it doesn't show up in git status, there are no uncommitted changes so it should not be locked or checked out by any user
549-
set Editable=1, IsCheckedOut=0, UserCheckedOut=""
549+
set IsCheckedOut=0, UserCheckedOut=""
550550
if ##class(SourceControl.Git.Change).IsUncommitted(filename)
551551
&& '##class(SourceControl.Git.Change).IsDeleted(InternalName, .files) {
552552
#; Remove the item from the list of uncommitted changes;
@@ -590,4 +590,3 @@ Method CheckBusinessProcessesAndRules(InternalName As %String) As %Status
590590
}
591591

592592
}
593-

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.15.0</Version>
6+
<Version>2.15.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>

test/UnitTest/SourceControl/Git/Extension.cls

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,13 @@ Method TestGeneratedFilesReadOnlyOption()
1919
$$$ThrowOnError(settings.%Save())
2020
set extension = ##class(SourceControl.Git.Extension).%New("")
2121
do $$$AssertNotTrue(extension.IsReadOnly("UnitTest.SourceControl.Git.GeneratedReadOnly.cls"))
22-
22+
do extension.GetStatus("UnitTest.SourceControl.Git.GeneratedReadOnly.cls",,.editable)
23+
do $$$AssertTrue(editable)
2324
set settings.generatedFilesReadOnly = 1
2425
$$$ThrowOnError(settings.%Save())
2526
do $$$AssertTrue(extension.IsReadOnly("UnitTest.SourceControl.Git.GeneratedReadOnly.cls"))
27+
do extension.GetStatus("UnitTest.SourceControl.Git.GeneratedReadOnly.cls",,.editable)
28+
do $$$AssertNotTrue(editable)
2629
} catch err {
2730
set sc = err.AsStatus()
2831
}
@@ -32,4 +35,4 @@ Method TestGeneratedFilesReadOnlyOption()
3235
$$$ThrowOnError(sc)
3336
}
3437

35-
}
38+
}

0 commit comments

Comments
 (0)