File tree Expand file tree Collapse file tree 2 files changed +51
-38
lines changed Expand file tree Collapse file tree 2 files changed +51
-38
lines changed Original file line number Diff line number Diff line change @@ -291,43 +291,7 @@ On failure
291
291
}
292
292
```
293
293
294
- ### /config - Get or add global configuration options
295
-
296
- URL:
297
-
298
- ``` bash
299
- GET /git/config
300
- ```
301
-
302
- HTTP Response
303
-
304
- ``` bash
305
- Status: 200 OK
306
- ```
307
-
308
- Reply JSON:
309
-
310
- On success
311
-
312
- ``` bash
313
- {
314
- " code" : " 0" ,
315
- " options" : {
316
- " key1" : " value1" ,
317
- " keyI" : " valueI"
318
- }
319
- }
320
- ```
321
-
322
- On failure
323
-
324
- ``` bash
325
- {
326
- " code" : 128,
327
- " command" : " git config --global --list"
328
- " message" : " Git command error info"
329
- }
330
- ```
294
+ ### /config - Get or set configuration options
331
295
332
296
URL:
333
297
@@ -339,6 +303,7 @@ Request JSON:
339
303
340
304
``` bash
341
305
{
306
+ " top_repo_path" : " /absolute/path/to/root/of/repo" ,
342
307
" options" : {
343
308
" key1" : " value1" ,
344
309
" keyI" : " valueI"
@@ -368,7 +333,7 @@ On failure
368
333
``` bash
369
334
{
370
335
" code" : 128,
371
- " command" : " git config --global -- add name value"
336
+ " command" : " git config --add name value"
372
337
" message" : " Git command error info"
373
338
}
374
339
```
Original file line number Diff line number Diff line change @@ -249,6 +249,54 @@ on git command failure
249
249
}
250
250
```
251
251
252
+ # ## /config - Get or set configuration options
253
+ Request or set configuration options for the repository provided by its path
254
+
255
+ URL :
256
+
257
+ ```bash
258
+ POST /git/config
259
+ ```
260
+
261
+ Request JSON:
262
+
263
+ ```bash
264
+ {
265
+ "top_repo_path": "/absolute/path/to/root/of/repo",
266
+ "options": {
267
+ "key1": "value1",
268
+ "keyI": "valueI"
269
+ }
270
+ }
271
+ ```
272
+
273
+ HTTP Response
274
+
275
+ ```bash
276
+ Status : 201 OK
277
+ ```
278
+
279
+ Reply JSON:
280
+
281
+ On success
282
+
283
+ ```bash
284
+ {
285
+ "code": "0",
286
+ "message": "Git command output"
287
+ }
288
+ ```
289
+
290
+ On failure
291
+
292
+ ```bash
293
+ {
294
+ "code": 128,
295
+ "command": "git config --add name value"
296
+ "message": "Git command error info"
297
+ }
298
+ ```
299
+
252
300
# ## git detailed_log - Get detailed information of a selected past commit
253
301
Request with a specified "selected_hash" and a "current_path" to get the detail info of this commit.
254
302
You can’t perform that action at this time.
0 commit comments