git-completion.bash: separate some commands onto their own line
In e94fb44042 (git-completion.bash: pass $__git_subcommand_idx from
__git_main(), 2021-03-24), a line was introduced which contained
multiple statements. This is difficult to read so break it into multiple
lines.
While we're at it, follow this convention for the rest of the
__git_main() and break up lines that contain multiple statements.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
			
			
This commit is contained in:
		 Denton Liu
					Denton Liu
				
			
				
					committed by
					
						 Junio C Hamano
						Junio C Hamano
					
				
			
			
				
	
			
			
			 Junio C Hamano
						Junio C Hamano
					
				
			
						parent
						
							6131807864
						
					
				
				
					commit
					8c8c8c0e16
				
			| @ -3400,17 +3400,35 @@ __git_main () | ||||
| 	while [ $c -lt $cword ]; do | ||||
| 		i="${words[c]}" | ||||
| 		case "$i" in | ||||
| 		--git-dir=*) __git_dir="${i#--git-dir=}" ;; | ||||
| 		--git-dir)   ((c++)) ; __git_dir="${words[c]}" ;; | ||||
| 		--bare)      __git_dir="." ;; | ||||
| 		--help) command="help"; break ;; | ||||
| 		-c|--work-tree|--namespace) ((c++)) ;; | ||||
| 		-C)	__git_C_args[C_args_count++]=-C | ||||
| 		--git-dir=*) | ||||
| 			__git_dir="${i#--git-dir=}" | ||||
| 			;; | ||||
| 		--git-dir) | ||||
| 			((c++)) | ||||
| 			__git_dir="${words[c]}" | ||||
| 			;; | ||||
| 		--bare) | ||||
| 			__git_dir="." | ||||
| 			;; | ||||
| 		--help) | ||||
| 			command="help" | ||||
| 			break | ||||
| 			;; | ||||
| 		-c|--work-tree|--namespace) | ||||
| 			((c++)) | ||||
| 			;; | ||||
| 		-C) | ||||
| 			__git_C_args[C_args_count++]=-C | ||||
| 			((c++)) | ||||
| 			__git_C_args[C_args_count++]="${words[c]}" | ||||
| 			;; | ||||
| 		-*) ;; | ||||
| 		*) command="$i"; __git_subcommand_idx="$c"; break ;; | ||||
| 		-*) | ||||
| 			;; | ||||
| 		*) | ||||
| 			command="$i" | ||||
| 			__git_subcommand_idx="$c" | ||||
| 			break | ||||
| 			;; | ||||
| 		esac | ||||
| 		((c++)) | ||||
| 	done | ||||
| @ -3432,7 +3450,8 @@ __git_main () | ||||
| 			;; | ||||
| 		esac | ||||
| 		case "$cur" in | ||||
| 		--*)   __gitcomp " | ||||
| 		--*) | ||||
| 			__gitcomp " | ||||
| 			--paginate | ||||
| 			--no-pager | ||||
| 			--git-dir= | ||||
|  | ||||
		Reference in New Issue
	
	Block a user