Skip to content

Import embedded-git-config.json first when performing an Import All #807

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

raymond-rebbeck
Copy link
Contributor

Fixes #806

The config file embedded-git-config.json is now imported first when performing an Import All.

  • It is only imported once
  • If it is imported then the item list is obtained again in case there are mapping configuration differences after import

This combined with some other recently merged PRs (#792, #799, #800) allows for an existing Git repository that contains a config file to be imported with the only initial configuration required being the repository location: ^SYS("SourceControl","Git","settings","namespaceTemp") (if your Git path and other defaults are acceptable at least)

quit:internalName=""

// If a config file is found then import it
if internalName = ##class(SourceControl.Git.Settings.Document).#INTERNALNAME {
Copy link

@cambot cambot Jul 18, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what it's worth, I think your for loop (lines 1572-1578) could be simplified to a single if statement:

if $Data(itemList(##class(SourceControl.Git.Settings.Document).#INTERNALNAME))

For me, the embedded-git-config.GSC index was at the very end of my list of files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. I agree and have updated the branch to do this. I have added you as a co-author.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import All should load the config file before anything else
2 participants