@@ -222,7 +222,7 @@ USAGE_new_EOF
222222
223223sub_init ()
224224{
225- local existing
225+ local existing username useremail
226226
227227 while getopts e flag ; do
228228 case $flag in
@@ -238,6 +238,8 @@ sub_init()
238238
239239 test -d .issues && error ' An .issues directory is already present'
240240 mkdir .issues || error ' Unable to create .issues directory'
241+ username=` git config --local user.name`
242+ useremail=` git config --local user.email`
241243 cdissues
242244 if ! [ " $existing " ] ; then
243245 git init -q || error ' Unable to initialize Git directory'
@@ -273,6 +275,12 @@ This is an distributed issue tracking repository based on Git.
273275Visit [git-issue](https://github.com/dspinellis/git-issue) for more information.
274276EOF
275277 git add config README.md templates/comment templates/description
278+ if [ -n " $username " ] ; then
279+ git config --local user.name " $username "
280+ fi
281+ if [ -n " $useremail " ] ; then
282+ git config --local user.email " $useremail "
283+ fi
276284 commit ' gi: Initialize issues repository' ' gi init'
277285 echo " Initialized empty issues repository in $( pwd) "
278286}
@@ -951,7 +959,7 @@ sub_edit()
951959 ;;
952960 esac
953961 done
954-
962+ 955963 shift $(( OPTIND - 1 )) ;
956964 test -n " 1ドル " || usage_edit
957965
0 commit comments