@@ -149,15 +149,15 @@ def run(
149
149
if cwd is not None :
150
150
cli_args .append (f"-C { cwd } " )
151
151
if git_dir is not None :
152
- cli_args .append ( f "--git-dir { git_dir } " )
152
+ cli_args .extend ([ "--git-dir" , str ( git_dir )] )
153
153
if work_tree is not None :
154
- cli_args .append ( f "--work-tree { work_tree } " )
154
+ cli_args .extend ([ "--work-tree" , str ( work_tree )] )
155
155
if namespace is not None :
156
- cli_args .append ( f "--namespace { namespace } " )
156
+ cli_args .extend ([ "--namespace" , namespace ] )
157
157
if super_prefix is not None :
158
- cli_args .append ( f "--super-prefix { super_prefix } " )
158
+ cli_args .extend ([ "--super-prefix" , super_prefix ] )
159
159
if exec_path is not None :
160
- cli_args .append ( f "--exec-path { exec_path } " )
160
+ cli_args .extend ([ "--exec-path" , exec_path ] )
161
161
if bare is True :
162
162
cli_args .append ("--bare" )
163
163
if no_replace_objects is True :
@@ -245,25 +245,25 @@ def clone(
245
245
if (filter := kwargs .pop ("filter" , None )) is not None :
246
246
local_flags .append (f"--filter={ filter } " )
247
247
if depth is not None :
248
- local_flags .append ( f "--depth { depth } " )
248
+ local_flags .extend ([ "--depth" , depth ] )
249
249
if branch is not None :
250
- local_flags .append ( f "--branch { branch } " )
250
+ local_flags .extend ([ "--branch" , branch ] )
251
251
if origin is not None :
252
- local_flags .append ( f "--origin { origin } " )
252
+ local_flags .extend ([ "--origin" , origin ] )
253
253
if upload_pack is not None :
254
- local_flags .append ( f "--upload-pack { upload_pack } " )
254
+ local_flags .extend ([ "--upload-pack" , upload_pack ] )
255
255
if shallow_since is not None :
256
256
local_flags .append (f"--shallow-since={ shallow_since } " )
257
257
if shallow_exclude is not None :
258
258
local_flags .append (f"--shallow-exclude={ shallow_exclude } " )
259
259
if reference is not None :
260
- local_flags .append ( f "--reference { reference } " )
260
+ local_flags .extend ([ "--reference" , reference ] )
261
261
if reference_if_able is not None :
262
- local_flags .append ( f "--reference { reference_if_able } " )
262
+ local_flags .extend ([ "--reference" , reference_if_able ] )
263
263
if server_option is not None :
264
264
local_flags .append (f"--server-option={ server_option } " )
265
265
if jobs is not None :
266
- local_flags .append ( f "--jobs { jobs } " )
266
+ local_flags .extend ([ "--jobs" , jobs ] )
267
267
if local is True :
268
268
local_flags .append ("--local" )
269
269
if hardlinks is True :
@@ -382,21 +382,21 @@ def fetch(
382
382
if (filter := kwargs .pop ("filter" , None )) is not None :
383
383
local_flags .append (f"--filter={ filter } " )
384
384
if depth is not None :
385
- local_flags .append ( f "--depth { depth } " )
385
+ local_flags .extend ([ "--depth" , depth ] )
386
386
if branch is not None :
387
- local_flags .append ( f "--branch { branch } " )
387
+ local_flags .extend ([ "--branch" , branch ] )
388
388
if origin is not None :
389
- local_flags .append ( f "--origin { origin } " )
389
+ local_flags .extend ([ "--origin" , origin ] )
390
390
if upload_pack is not None :
391
- local_flags .append ( f "--upload-pack { upload_pack } " )
391
+ local_flags .extend ([ "--upload-pack" , upload_pack ] )
392
392
if shallow_since is not None :
393
393
local_flags .append (f"--shallow-since={ shallow_since } " )
394
394
if shallow_exclude is not None :
395
395
local_flags .append (f"--shallow-exclude={ shallow_exclude } " )
396
396
if server_option is not None :
397
397
local_flags .append (f"--server-option={ server_option } " )
398
398
if jobs is not None :
399
- local_flags .append ( f "--jobs { jobs } " )
399
+ local_flags .extend ([ "--jobs" , jobs ] )
400
400
if keep :
401
401
local_flags .append ("--keep" )
402
402
if force :
@@ -548,12 +548,12 @@ def rebase(
548
548
if branch :
549
549
required_flags .insert (0 , branch )
550
550
if onto :
551
- local_flags .append ( f "--onto { onto } " )
551
+ local_flags .extend ([ "--onto" , onto ] )
552
552
if context :
553
- local_flags .append ( f "--C{ context } " )
553
+ local_flags .extend ([ "--C" , context ] )
554
554
555
555
if exec :
556
- local_flags .append ( f "--exec { shlex .quote (exec )} " )
556
+ local_flags .extend ([ "--exec" , shlex .quote (exec )] )
557
557
if reschedule_failed_exec :
558
558
local_flags .append ("--reschedule-failed-exec" )
559
559
if no_reschedule_failed_exec :
@@ -856,21 +856,21 @@ def pull(
856
856
if (filter := kwargs .pop ("filter" , None )) is not None :
857
857
local_flags .append (f"--filter={ filter } " )
858
858
if depth is not None :
859
- local_flags .append ( f "--depth { depth } " )
859
+ local_flags .extend ([ "--depth" , depth ] )
860
860
if branch is not None :
861
- local_flags .append ( f "--branch { branch } " )
861
+ local_flags .extend ([ "--branch" , branch ] )
862
862
if origin is not None :
863
- local_flags .append ( f "--origin { origin } " )
863
+ local_flags .extend ([ "--origin" , origin ] )
864
864
if upload_pack is not None :
865
- local_flags .append ( f "--upload-pack { upload_pack } " )
865
+ local_flags .extend ([ "--upload-pack" , upload_pack ] )
866
866
if shallow_since is not None :
867
867
local_flags .append (f"--shallow-since={ shallow_since } " )
868
868
if shallow_exclude is not None :
869
869
local_flags .append (f"--shallow-exclude={ shallow_exclude } " )
870
870
if server_option is not None :
871
871
local_flags .append (f"--server-option={ server_option } " )
872
872
if jobs is not None :
873
- local_flags .append ( f "--jobs { jobs } " )
873
+ local_flags .extend ([ "--jobs" , jobs ] )
874
874
if keep :
875
875
local_flags .append ("--keep" )
876
876
if force :
@@ -998,9 +998,9 @@ def init(
998
998
if object_format is not None :
999
999
local_flags .append (f"--object-format={ object_format } " )
1000
1000
if branch is not None :
1001
- local_flags .append ( f "--branch { branch } " )
1001
+ local_flags .extend ([ "--branch" , branch ] )
1002
1002
if initial_branch is not None :
1003
- local_flags .append ( f "--initial-branch { initial_branch } " )
1003
+ local_flags .extend ([ "--initial-branch" , initial_branch ] )
1004
1004
if shared is True :
1005
1005
local_flags .append ("--shared" )
1006
1006
if quiet is True :
0 commit comments