You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(git): address R2 review feedback on submodule support
- Fix swapped git.Open arguments at lines 112 and 136. The storer was
backed by the worktree root and the worktree arg was the .git/
filesystem. This made every workspace restart fail to detect the
existing repo, fall through to CloneContext, and hit
ErrRepositoryAlreadyExists. (AMREM-14)
- Clean up orphaned .git directory when CloneContext fails in
cloneSubmodule. Without this, one failed clone permanently poisons
the submodule directory: the next Stat(".git") takes the
already-cloned fast path and tries to Open a broken repo. (AMREM-16)
- Use openSubmoduleRepo in the already-cloned branch of
cloneSubmodule, removing the duplicate Chroot/NewStorage/Open
sequence. (AMREM-25)
- Rewrite extractHost to delegate to transport.NewEndpoint instead of
reimplementing SCP URL parsing with a separate regex. (AMREM-24)
- Include fetchErr in the "Direct fetch failed" log message so
operators see why the targeted fetch was rejected. (AMREM-22)
- Track warnings in initSubmodules and adjust the final log line so
it does not claim all submodules initialized successfully when
warnings were emitted. (AMREM-23)
- Correct the SameHost doc comment: port is ignored as a
simplification, not to match git credential helpers (which do
include port). (AMREM-27)
- Change "positive integer" to "non-negative integer (0 disables)"
in SubmoduleDepth docs and error messages, matching the actual
guard (n < 0). (AMREM-28)
- Cap SubmoduleDepth at 100 to bound runaway recursion. (AMREM-31)
- Document cross-protocol auth forwarding in submoduleAuthFor as
intentional. go-git rejects incompatible auth at the transport
layer. (AMREM-15)
- Fix test logf to use fmt.Fprintf so format args are expanded and
the warning check is not vacuously true. (AMREM-20)
- Fix TestCloneRepo/AlreadyCloned to produce a repo in the layout
CloneRepo expects (.git/ subdirectory) by cloning first, rather
than using gittest.NewRepo which writes objects at the root.
Skip the subtest when the test case expects the initial clone to
fail. (AMREM-14 test fix)
Copy file name to clipboardExpand all lines: docs/env-variables.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,7 +28,7 @@
28
28
|`--git-clone-depth`|`ENVBUILDER_GIT_CLONE_DEPTH`|| The depth to use when cloning the Git repository. |
29
29
|`--git-clone-single-branch`|`ENVBUILDER_GIT_CLONE_SINGLE_BRANCH`|| Clone only a single branch of the Git repository. |
30
30
|`--git-clone-thinpack`|`ENVBUILDER_GIT_CLONE_THINPACK`|`true`| Git clone with thin pack compatibility enabled, ensuring that even when thin pack compatibility is activated,it will not be turned on for the domain dev.azure.com. |
31
-
|`--git-clone-submodules`|`ENVBUILDER_GIT_CLONE_SUBMODULES`|| Clone Git submodules after cloning the repository. Accepts 'true' (max depth 10), 'false' (disabled), or a positive integer for max recursion depth. |
31
+
|`--git-clone-submodules`|`ENVBUILDER_GIT_CLONE_SUBMODULES`|| Clone Git submodules after cloning the repository. Accepts 'true' (max depth 10), 'false' (disabled), or a non-negative integer for max recursion depth (0 disables, max 100). |
32
32
|`--git-username`|`ENVBUILDER_GIT_USERNAME`|| The username to use for Git authentication. This is optional. |
33
33
|`--git-password`|`ENVBUILDER_GIT_PASSWORD`|| The password to use for Git authentication. This is optional. |
34
34
|`--git-ssh-private-key-path`|`ENVBUILDER_GIT_SSH_PRIVATE_KEY_PATH`|| Path to an SSH private key to be used for Git authentication. If this is set, then GIT_SSH_PRIVATE_KEY_BASE64 cannot be set. |
0 commit comments