diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c34108a..7543cc8c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,9 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Pre-release support for IPM v0.9.0+ - Items mapped from database other than namespace's default routine database are now ignored by default when exporting or adding files - New setting to configure whether mapped items should be should be treated as read-only -- Added a new "Branch" parameter to `##class(SourceControl.Git.PullEventHandler)` (#35 +- Now skips files belonging to other git enabled packages in `##class(SourceControl.Git.Change).RefreshUncommitted()` (#347) +- Added a new "Branch" parameter to `##class(SourceControl.Git.PullEventHandler)` (#351) - Command-line utility to do a baseline export of items in a namespace + ## [2.3.1] - 2024-04-30 ### Fixed diff --git a/cls/SourceControl/Git/Change.cls b/cls/SourceControl/Git/Change.cls index e8001143..795123bf 100644 --- a/cls/SourceControl/Git/Change.cls +++ b/cls/SourceControl/Git/Change.cls @@ -131,8 +131,13 @@ ClassMethod RefreshUncommitted(Display = 0, IncludeRevert = 0, Output gitFiles, set examine=$select(action="add":1,action="edit":1,action="delete":1, IncludeRevert&&(action="revert"):1,1:0) if 'examine set filename=$order(tFileList(filename),1,action) continue + set packageRoot = ##class(SourceControl.Git.Utils).TempFolder() set InternalName = ##class(SourceControl.Git.Utils).NameToInternalName(filename,0,0) + // skip files belonging to other git enabled packages + if ($EXTRACT(filename, 1, $LENGTH(packageRoot)) '= packageRoot) continue + + if (('##class(%File).Exists(filename)) || (InternalName = "") || ((InternalName '= "") && ('$data(gitFiles(InternalName), found)) && (($data($$$TrackedItems(InternalName))) || ##class(SourceControl.Git.Utils).NormalizeExtension($data($$$TrackedItems(InternalName)))))) { set sc=..RemoveUncommitted(filename,Display,0,0)