Repository navigation
link: cmux link seed push and seed clone, a Cloud project seed with the copy as fallback #30634
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
Changes from all commits
97fd9e0
680454b
aad041c
9aabf92
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -183,6 +183,27 @@ impl GitSeedService { | |||||||
| Self { roots, config, jobs: Mutex::new(Jobs::default()) } | ||||||||
| } | ||||||||
|
|
||||||||
| /// For tests (and the debug-only daemon seam in [`super::installed`]): | ||||||||
| /// a service whose GitHub is the folder `github`, so | ||||||||
| /// `https://github.com/OWNER/NAME.git` is cloned from | ||||||||
| /// `file://<github>/OWNER/NAME.git`, with no credential. Nothing on the | ||||||||
| /// wire reaches it. | ||||||||
| #[doc(hidden)] | ||||||||
| #[must_use] | ||||||||
| pub fn with_test_github(roots: Roots, github: &std::path::Path) -> Self { | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: Prompt for AI agents
Suggested change
|
||||||||
| let local = format!("file://{}/", github.display()); | ||||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. P3: A non-UTF-8 absolute directory accepted by the environment seam is lossy-converted by Prompt for AI agents |
||||||||
| let config = Config { | ||||||||
| git: Git { | ||||||||
| extra_config: vec![ | ||||||||
| format!("url.{local}.insteadOf=https://github.com/"), | ||||||||
| "protocol.file.allow=always".into(), | ||||||||
| ], | ||||||||
| }, | ||||||||
| credentials: Some(vec![Credential::Anonymous]), | ||||||||
| }; | ||||||||
| Self::with_config(roots, config) | ||||||||
| } | ||||||||
|
|
||||||||
| /// Runs `cmd` with the request object `params`. | ||||||||
| pub fn call(&self, cmd: &str, params: &Value) -> Result<Value, SeedRefusal> { | ||||||||
| match cmd { | ||||||||
|
|
||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P3: A relative
CMUX_TEST_GIT_SEED_GITHUBis ignored without any signal, so the seed quietly clones from real GitHub instead of the test directory. Warn or panic when the variable is set but not absolute, rather than filtering it out.Prompt for AI agents