Bläddra i källkod

Actually don't put a comma if there's only one element in the ignore list.

Samuel Jaffe 8 år sedan
förälder
incheckning
fa6ca1cb72
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3 1
      profile-git

+ 3 - 1
profile-git

@@ -17,7 +17,9 @@ git-create() {
   local message="Initializing repository"
   if [[ $# -ge 1 ]]; then
     for i in "$@"; do git-ignore "${i}"; done
-    message+=" with ignore lists: [ $1$(printf ", %s" "${@:2}") ]"
+    message+=" with ignore lists: [ $1"
+    $# -eq 1 || message+="$(printf ", %s" "${@:2}")"
+    message+=" ]"
   fi
   maybe_do git-ignore-local
   git add .gitignore