File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ clone() {
166166 You should add files to your new repository."
167167 exit
168168 fi
169- GIT_VERSION_MAJOR=$( git --version | sed -n ' s/.* \ ([0-9]\+\ )\..*/\1/p' )
169+ GIT_VERSION_MAJOR=$( git --version | sed -E - n ' s/.* ([0-9]+ )\..*/\1/p' )
170170 if [ 1 -lt " $GIT_VERSION_MAJOR " ]; then
171171 git fetch origin " $VCSH_BRANCH "
172172 else
@@ -482,8 +482,8 @@ write_gitignore() {
482482 use
483483 cd " $VCSH_BASE " || fatal " could not enter '$VCSH_BASE '" 11
484484 local GIT_VERSION=" $( git --version) "
485- local GIT_VERSION_MAJOR=$( echo $GIT_VERSION | sed -n ' s/.* \ ([0-9]\+\ )\..*/\1/p' )
486- local GIT_VERSION_MINOR=$( echo $GIT_VERSION | sed -n ' s/.* \ ([0-9]\+\ )\.\ ([0-9]\+\ )\..*/\2/p' )
485+ local GIT_VERSION_MAJOR=$( echo $GIT_VERSION | sed -E - n ' s/.* ([0-9]+ )\..*/\1/p' )
486+ local GIT_VERSION_MINOR=$( echo $GIT_VERSION | sed -E - n ' s/.* ([0-9]+ )\.([0-9]+ )\..*/\2/p' )
487487 OLDIFS=$IFS
488488 IFS=$( printf ' \n\t' )
489489 gitignores=$( for file in $( git ls-files) ; do
You can’t perform that action at this time.
0 commit comments