Skip to content

Commit 310ce67

Browse files
committed
fix: after cloning with Configure, import settings from config file
1 parent 6b6a760 commit 310ce67

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1010
### Added
1111
- Option to lock/unlock namespace is now available on the settings page (#650)
1212

13+
### Fixed
14+
- When cloning a repo with Configure, that repo's embedded-git-config file will overwrite previous settings (#819)
15+
1316
## [2.13.1] - 2025-09-16
1417

1518
### Fixed

cls/SourceControl/Git/Settings.cls

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,8 +454,13 @@ Method OnAfterConfigure() As %Boolean
454454
set workMgr = $System.WorkMgr.%New("")
455455
$$$ThrowOnError(workMgr.Queue("##class(SourceControl.Git.Utils).Clone",remote))
456456
$$$ThrowOnError(workMgr.WaitForComplete())
457-
// export settings file without committing
458-
$$$ThrowOnError(..SaveWithSourceControl())
457+
if ##class(%File).Exists(##class(SourceControl.Git.Utils).FullExternalName(##class(SourceControl.Git.Settings.Document).#INTERNALNAME)) {
458+
write !, "Importing Embedded Git settings from cloned repository:"
459+
do ##class(SourceControl.Git.Utils).ImportItem(##class(SourceControl.Git.Settings.Document).#INTERNALNAME)
460+
} else {
461+
// export settings file without committing
462+
$$$ThrowOnError(..SaveWithSourceControl())
463+
}
459464

460465
// Empty repo breaks Embedded Git, commit the settings file
461466
do ##class(SourceControl.Git.Utils).RunGitCommandWithInput("log",,.errStream,.outStream)
@@ -523,4 +528,3 @@ Method SaveDefaults() As %Boolean
523528
}
524529

525530
}
526-

0 commit comments

Comments
 (0)