-
Notifications
You must be signed in to change notification settings - Fork 72
Commit 0a3c9b0
feat: add
## Description
<!-- Briefly describe what this PR does and why -->
Adds support for a `depth` variable to the git-clone module. If a repo
is large, a shallow clone makes the `git clone` a lot faster
## Type of Change
- [ ] New module
- [ ] Bug fix
- [x] Feature/enhancement
- [ ] Documentation
- [ ] Other
## Module Information
<!-- Delete this section if not applicable -->
**Path:** `registry/coder/modules/git-clone`
**New version:** `v1.0.19` ?
**Breaking change:**
- [ ] Yes
- [x] No
## Testing & Validation
- [ ] Tests pass (`bun test`)
- [ ] Code formatted (`bun run fmt`)
- [ ] Changes tested locally
- `bun test` - I don't know if this is expected
```shell
✗ git-clone > fails without git [298.14ms]
✗ git-clone > runs with git [289.14ms]
✗ git-clone > runs with github clone with switch to feat/branch
[277.19ms]
✗ git-clone > runs with gitlab clone with switch to feat/branch
[293.49ms]
✗ git-clone > runs with github clone with branch_name set to feat/branch
[288.07ms]
```
## Related Issues
<!-- Link related issues or write "None" if not applicable -->
None
---------
Co-authored-by: EdwardAngert <17991901+EdwardAngert@users.noreply.github.com>
Co-authored-by: DevelopmentCats <christofer@coder.com>--depth
to git-clone module to support shallow clones (#197)1 parent 05b24da commit 0a3c9b0
3 files changed
+47
-12
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
15 | 15 |
| |
16 | 16 |
| |
17 | 17 |
| |
18 | - | ||
18 | + | ||
19 | 19 |
| |
20 | 20 |
| |
21 | 21 |
| |
| |||
29 | 29 |
| |
30 | 30 |
| |
31 | 31 |
| |
32 | - | ||
32 | + | ||
33 | 33 |
| |
34 | 34 |
| |
35 | 35 |
| |
| |||
44 | 44 |
| |
45 | 45 |
| |
46 | 46 |
| |
47 | - | ||
47 | + | ||
48 | 48 |
| |
49 | 49 |
| |
50 | 50 |
| |
| |||
70 | 70 |
| |
71 | 71 |
| |
72 | 72 |
| |
73 | - | ||
73 | + | ||
74 | 74 |
| |
75 | 75 |
| |
76 | 76 |
| |
| |||
104 | 104 |
| |
105 | 105 |
| |
106 | 106 |
| |
107 | - | ||
107 | + | ||
108 | 108 |
| |
109 | 109 |
| |
110 | 110 |
| |
| |||
123 | 123 |
| |
124 | 124 |
| |
125 | 125 |
| |
126 | - | ||
126 | + | ||
127 | 127 |
| |
128 | 128 |
| |
129 | 129 |
| |
| |||
135 | 135 |
| |
136 | 136 |
| |
137 | 137 |
| |
138 | - | ||
138 | + | ||
139 | 139 |
| |
140 | 140 |
| |
141 | 141 |
| |
| |||
156 | 156 |
| |
157 | 157 |
| |
158 | 158 |
| |
159 | - | ||
159 | + | ||
160 | 160 |
| |
161 | 161 |
| |
162 | 162 |
| |
| |||
165 | 165 |
| |
166 | 166 |
| |
167 | 167 |
| |
168 | - | ||
168 | + | ||
169 | + | ||
169 | 170 |
| |
170 | 171 |
| |
171 | 172 |
| |
172 | 173 |
| |
173 | 174 |
| |
174 | 175 |
| |
175 | 176 |
| |
176 | - | ||
177 | + | ||
177 | 178 |
| |
178 | 179 |
| |
179 | 180 |
| |
180 | 181 |
| |
181 | 182 |
| |
182 | 183 |
| |
184 | + | ||
185 | + | ||
186 | + | ||
187 | + | ||
188 | + | ||
189 | + | ||
190 | + | ||
191 | + | ||
192 | + | ||
193 | + | ||
194 | + | ||
195 | + | ||
196 | + | ||
197 | + | ||
198 | + | ||
199 | + | ||
200 | + | ||
201 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
56 | 56 |
| |
57 | 57 |
| |
58 | 58 |
| |
59 | + | ||
60 | + | ||
61 | + | ||
62 | + | ||
63 | + | ||
64 | + | ||
59 | 65 |
| |
60 | 66 |
| |
61 | 67 |
| |
| |||
113 | 119 |
| |
114 | 120 |
| |
115 | 121 |
| |
122 | + | ||
116 | 123 |
| |
117 | 124 |
| |
118 | 125 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
5 | 5 |
| |
6 | 6 |
| |
7 | 7 |
| |
8 | + | ||
8 | 9 |
| |
9 | 10 |
| |
10 | 11 |
| |
| |||
36 | 37 |
| |
37 | 38 |
| |
38 | 39 |
| |
39 | - | ||
40 | + | ||
41 | + | ||
42 | + | ||
43 | + | ||
44 | + | ||
40 | 45 |
| |
41 | 46 |
| |
42 | - | ||
47 | + | ||
48 | + | ||
49 | + | ||
50 | + | ||
51 | + | ||
43 | 52 |
| |
44 | 53 |
| |
45 | 54 |
| |
|
0 commit comments