Skip to content

Commit 86a70e3

Browse files
committed
Add force export condition
1 parent c62aac2 commit 86a70e3

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020
- Fixed git path configuration (#463)
2121
- Added feedback to settings page (#550)
2222
- Fix "Home" navigation to point to current namespace (#548)
23+
- Force export of item if it has been modified (#354)
2324

2425
## [2.6.0] - 2024-10-07
2526

cls/SourceControl/Git/Extension.cls

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,8 @@ Method OnAfterSave(InternalName As %String, Object As %RegisteredObject = {$$$NU
328328
} else {
329329
set filename = ##class(SourceControl.Git.Utils).FullExternalName(InternalName)
330330
$$$ThrowOnError(##class(SourceControl.Git.Utils).RemoveRoutineTSH(InternalName))
331-
$$$ThrowOnError(##class(SourceControl.Git.Utils).ExportItem(InternalName))
331+
set forceExport = (InternalName'= "") && ($data(..Modified(InternalName)))
332+
$$$ThrowOnError(##class(SourceControl.Git.Utils).ExportItem(InternalName,,forceExport))
332333
if '##class(SourceControl.Git.Change).IsUncommitted(filename) {
333334
$$$ThrowOnError(##class(SourceControl.Git.Change).SetUncommitted(filename, "edit", InternalName, $username, "", 1, "", "", 0))
334335
}

0 commit comments

Comments
 (0)