This file is indexed.

/usr/share/yash/completion/git-svn is in yash 2.43-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
# (C) 2011-2015 magicant

# Completion script for the "git-svn" command.
# Supports Git 1.7.7.

function completion/git-svn {
	WORDS=(git svn "${WORDS[2,-1]}")
	command -f completion//reexecute
}

function completion/git::svn:arg
	if [ ${WORDS[#]} -le 1 ]; then #>>#
		complete -P "$PREFIX" -D "commit a diff to a Subversion repository" commit-diff
		complete -P "$PREFIX" -D "commit local commits to the Subversion repository" dcommit
		complete -P "$PREFIX" -D "commit to the Subversion repository without checking for conflicts" set-tree
		complete -P "$PREFIX" -D "convert commit IDs and revision numbers" find-rev
		complete -P "$PREFIX" -D "create a branch" branch
		complete -P "$PREFIX" -D "create a gitignore file" create-ignore
		complete -P "$PREFIX" -D "create a tag" tag
		complete -P "$PREFIX" -D "fetch and rebase local commits" rebase
		complete -P "$PREFIX" -D "fetch revisions from a remote Subversion repository" fetch
		complete -P "$PREFIX" -D "init and fetch" clone
		complete -P "$PREFIX" -D "initialize a Git repository associated with a Subversion repository" init
		complete -P "$PREFIX" -D "print a property of a file" propget
		complete -P "$PREFIX" -D "print candidates for the info/exclude file" show-ignore
		complete -P "$PREFIX" -D "print external repositories" show-externals
		complete -P "$PREFIX" -D "print info about files" info
		complete -P "$PREFIX" -D "print properties of a file" proplist
		complete -P "$PREFIX" -D "print revision log" log
		complete -P "$PREFIX" -D "recreate empty directories" mkdirs
		complete -P "$PREFIX" -D "reduce local repository size" gc
		complete -P "$PREFIX" -D "show a file with commit info" blame
		complete -P "$PREFIX" -D "undo fetch" reset
	else #<<#
		WORDS=("${WORDS[2,-1]}")
		if command -vf "completion/git::svn:${WORDS[1]}:arg" >/dev/null 2>&1; then
			command -f "completion/git::svn:${WORDS[1]}:arg"
		fi
	fi

function completion/git::svn:blame:arg {

	OPTIONS=( #>#
	"--git-format; print in the git blame format"
	) #<#
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
		('')
			command -f completion/git::completepath -a
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:branch:arg {

	OPTIONS=( #>#
	"--commit-url:; specify a repository URL to commit to"
	"d: --destination:; specify a branch/tag path to operate on"
	"n --dry-run; don't actually make a branch/tag"
	"m: --message:; specify the commit message"
	"t --tag; create a tag rather than a branch"
	"--username:; specify a user name for authentication"
	) #<#
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
		(--destination)
			# TODO
			;;
#		(m|--message)
#			;;
		('')
			command -f completion/git::completeref --branches
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:clone:arg {

	OPTIONS=( #>#
	"--preserve-empty-dirs; create empty directories with dummy files"
	"--placeholder-filename:; specify the name of dummy files in empty directories"
	) #<#
	command -f completion/git::svn:getcommonopt
	command -f completion/git::svn:fetch:getopt
	command -f completion/git::svn:init:getopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
		(--placeholder-filename)
			complete -P "$PREFIX" -f
			;;
#		('')
#			# Hmm... How can we complete a URL?
#			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:commit-diff:arg {

	OPTIONS=()
	command -f completion/git::svn:getcommonopt
	command -f completion/git::svn:commit-diff:getopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		(l)
#			#TODO
#			;;
		('')
			command -f completion//getoperands
			case ${WORDS[#]} in
			([01])
				command -f completion/git::completeref
				;;
#			(2)
#			# Hmm... How can we complete a URL?
#				;;
			esac
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:commit-diff:getopt {
	OPTIONS=("$OPTIONS" #>#
	"--add-author-from; add an author name to each log message"
	"e --edit; reedit the message"
	"--find-copies-harder" #TODO
	"l:" #TODO
	"--rmdir; remove empty directories from the Subversion tree"
	) #<#
	command -f completion/git::svn:getauthoropt
}

function completion/git::svn:create-ignore:arg {

	OPTIONS=( #>#
	"r: --revision:; specify a revision to show"
	) #<#
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions -n
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		(r|--revision)
#			;;
#		('')
#			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:dcommit:arg {

	OPTIONS=( #>#
	"--commit-url:; specify a repository URL to commit to"
	"n --dry-run; don't actually commit anything"
	"m --merge; use merging strategies to rebase"
	"--mergeinfo:; specify mergeinfo to add"
	"--no-rebase; don't rebase after committing"
	"s: --strategy:; specify the merge strategy"
	) #<#
	command -f completion/git::svn:getcommonopt
	command -f completion/git::svn:commit-diff:getopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		(l)
#			#TODO
#			;;
		(s|--strategy)
			if command -vf completion/git::rebase:compopt >/dev/null 2>&1 ||
					. -AL completion/git-rebase; then
				command -f completion/git::rebase:compopt
			fi
			;;
		('')
			command -f completion/git::completeref
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:fetch:arg {

	OPTIONS=( #>#
	"--parent; fetch only from the Subversion parent of the current HEAD"
	) #<#
	command -f completion/git::svn:getcommonopt
	command -f completion/git::svn:fetch:getopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
		('')
			command -f completion/git::svn:completesvnremotes
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:fetch:getopt {
	OPTIONS=("$OPTIONS" #>#
	"--ignore-paths:; specify a regular expression whose matching pathnames are ignored when fetching"
	"--localtime; store Git commit dates in the local timezone"
	#"--repack::" obsolete option
	#"--repack-flags:" obsolete option
	"--use-log-author; find author names out of log messages"
	) #<#
	command -f completion/git::svn:getauthoropt
}

function completion/git::svn:find-rev:arg {

	OPTIONS=()
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
		('')
			command -f completion/git::completeref
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

#function completion/git::svn:gc:arg {
#}

function completion/git::svn:info:arg {

	OPTIONS=( #>#
	"--url; only print the URL of the remote Subversion repository"
	) #<#
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
		('')
			command -f completion/git::completepath -a
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:init:arg {

	OPTIONS=("$OPTIONS" #>#
	"--shared::; share the repository with other users"
	"--template:; specify a directory that contains templates"
	) #<#
	command -f completion/git::svn:getcommonopt
	command -f completion/git::svn:init:getopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		('')
#			# Hmm... How can we complete a URL?
#			;;
		(*)
			{ { command -vf completion/git::init:compopt >/dev/null 2>&1 ||
					. -AL completion/git-init; } &&
				command -f completion/git::init:compopt; } ||
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:init:getopt {
	OPTIONS=("$OPTIONS" #>#
	"b: --branches:; specify the branches subdirectory name"
	"--ignore-paths:; specify a regular expression whose matching pathnames are ignored when fetching"
	"--no-metadata; set the noMetadata option"
	"--no-minimize-url; don't normalize URL to the repository root"
	"--prefix:; specify the prefix for trunk/branches/tags"
	"--rewrite-root:; specify the rewriteRoot option value"
	"--rewrite-uuid:; specify the rewriteUUID option value"
	"s --stdlayout; follow the standard trunk/branches/tags directory layout"
	"t: --tags:; specify the tags subdirectory name"
	"T: --trunk:; specify the trunk subdirectory name"
	"--username:; specify a user name for authentication"
	"--use-svm-props; set the useSvmProps option"
	"--use-svnsync-props; set the useSvnsyncProps option"
	) #<#
}

function completion/git::svn:log:arg {

	OPTIONS=( #>#
	"--incremental; print output in a format suitable for concatenation"
	"--limit:; specify the number of revisions to show at most"
	"--oneline; use only one line for each revision"
	"r: --revision:; specify a revision (range) to show"
	"--show-commit; show git commit IDs as well"
	"v --verbose; print additional info"
	) #<#
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions -n
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		(--limit)
#			;;
#		(r|--revision)
#			;;
		('')
			command -f completion/git::completepath -a
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

#function completion/git::svn:mkdirs:arg {
#}

function completion/git::svn:propget:arg {

	OPTIONS=( #>#
	"r: --revision:; specify a revision to show"
	) #<#
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		(r|--revision)
#			;;
		('')
			command -f completion//getoperands
			if [ ${WORDS[#]} -eq 0 ]; then
				if command -vf completion/svn::completepropname >/dev/null 2>&1 ||
						. -AL completion/svn; then
					command -f completion/svn::completepropname
				fi
			else
				command -f completion/git::completepath -r
			fi
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:proplist:arg {

	OPTIONS=( #>#
	"r: --revision:; specify a revision to show"
	) #<#
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions -n
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		(r|--revision)
#			;;
		('')
			command -f completion/git::completepath -r
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:rebase:arg {

	OPTIONS=( #>#
	"n --dry-run; just print the remote branch name and URL"
	"l --local; don't fetch remotely; just rebase to already-fetched revision"
	) #<#
	command -f completion/git::svn:getcommonopt
	command -f completion/git::svn:fetch:getopt
	if command -vf completion/git::rebase:getopt >/dev/null 2>&1 ||
			. -AL completion/git-rebase; then
		command -f completion/git::rebase:getopt
	fi

	command -f completion//parseoptions -n
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
		('')
			;;
		(*)
			{ { command -vf completion/git::rebase:compopt >/dev/null 2>&1 ||
					. -AL completion/git-rebase; } &&
				command -f completion/git::rebase:compopt; } ||
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:reset:arg {

	OPTIONS=( #>#
	"p --parent; discard the specified revision as well"
	"r: --revision:; specify the most recent revision to keep"
	) #<#
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions -n
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		(r|--revision)
#			;;
#		('')
#			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:set-tree:arg {

	OPTIONS=( #>#
	"--stdin; read a list of commits from the standard input and commit them"
	) #<#
	command -f completion/git::svn:getcommonopt
	command -f completion/git::svn:commit-diff:getopt

	command -f completion//parseoptions
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		(l)
#			#TODO
#			;;
		('')
			command -f completion/git::completeref
			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

function completion/git::svn:show-externals:arg {

	OPTIONS=( #>#
	"r: --revision:; specify a revision to show"
	) #<#
	command -f completion/git::svn:getcommonopt

	command -f completion//parseoptions -n
	case $ARGOPT in
		(-)
			command -f completion//completeoptions
			;;
#		(r|--revision)
#			;;
#		('')
#			;;
		(*)
			command -f completion/git::svn:compopt
			;;
	esac

}

#function completion/git::svn:show-ignore:arg {
#}

function completion/git::svn:tag:arg {
	command -f completion/git::svn:branch:arg
}

function completion/git::svn:getcommonopt {
	OPTIONS=("$OPTIONS" #>#
	"q --quiet; print less messages"
	) #<#
}

function completion/git::svn:getauthoropt {
	OPTIONS=("$OPTIONS" #>#
	"A: --authors-file:; specify a file containing author names"
	"--authors-prog:; specify a program that returns an author name and email"
	) #<#
}

function completion/git::svn:compopt
	case $ARGOPT in
		(A|--authors-file|--ignore-paths|--placeholder-filename)
			complete -P "$PREFIX" -f
			;;
		(--authors-prog)
			WORDS=()
			command -f completion//reexecute -e
			;;
#		(b|--branches)
#			#TODO
#			;;
#		(--commit-url)
#			# Hmm... How can we complete a URL?
#			;;
#		(l)
#			#TODO
#			;;
		(--username)
			complete -P "$PREFIX" -u
			;;
		(*)
			return 1
			;;
	esac

function completion/git::svn:completesvnremotes {
	typeset name url
	while read -r name url; do
		complete -P "$PREFIX" -D "$url" -- "${{name#*.}%.*}"
	done 2>/dev/null <(git config --get-regexp 'svn-remote\..*\.url')
}


# vim: set ft=sh ts=8 sts=8 sw=8 noet: