Bug r26560 error on session initialization - update git scripts on login

Magus_Prime

Well-known member
So I decided to take this new git support out for a spin and checked the new preference to update any git scripts during login. What I got was "error on session initialization". I turned on debug logging and tried again. The log is attached.

This happens reliably if I enable the new preference.

I haven't taken a dive into the code but I did read through the thread on the commit, is there a gCLI command that would allow the equivalent of the "svn update" command? I'm looking for a way to replicate the functionality on-demand rather than as part of the login process.
 

Attachments

  • DEBUG_20220714.txt
    13.1 KB · Views: 3
Last edited:

AlbinoRhino

Active member
Code:
git update <project>
should work.

I suspect you don't have a git directory. Will check after work.

r26584
I tried the git command out today. A 'git' directory was created and the repo files were downloaded to there. However, it doesn't appear that the files made it any further. I was using the ChIT repo and none of the files seems to have been copied to the relay directory. Tried 'sync' and 'update' with no luck. Tried the ash commands too. Am I correct that they require a much more specific 'project' name than the cli command does? I had to use the full folder name to get git_exists() to return true whereas the cli command seems more forgiving.

> git update Loathing-Associates-Scripting-Society-ChIT

Updating project Loathing-Associates-Scripting-Society-ChIT
Pull

> git update ChIT

Updating project Loathing-Associates-Scripting-Society-ChIT
Pull

> git sync ChIT

> git sync Loathing-Associates-Scripting-Society-ChIT

> ash git_info("Loathing-Associates-Scripting-Society-ChIT")

Returned: record {string url; string branch; string commit; string last_changed_author; string last_changed_date;}
url => https://github.com/Loathing-Associates-Scripting-Society/ChIT
branch => main
commit => b813a928d1c363b2bccee6e9feb139fac5102219
last_changed_author => soolar
last_changed_date => Wed Jul 06 19:54:40 2022 GMT-07:00

No response to sync. I ran those commands with a debug log but there was nothing in it but what's already shown above. Any ideas? Anything I can do to help figure it out?

Thanks!
 

Ryo_Sangnoir

Developer
Staff member
Git only syncs folders in the permissible list: scripts, data, images, relay, ccs, planting.

ChIT has a "src" directory that contains these folders, instead of having them in the root. This is currently not supported by the Git client, but I am working on it. Under SVN, there were two main ways of supplying scripts: "release branch" or "separate folder". Git supports the former but not the latter.

To CLI / ash: CLI commands accept any substring of a given project. For ash, "_info" accepts a substring while the others require the full project name: this was how the SVN commands behaved.
 
Top