Skip to content

Commit

Permalink
Fixes multiple matches selection
Browse files Browse the repository at this point in the history
Signed-off-by: Tj Holowaychuk <tj@vision-media.ca>
  • Loading branch information
jweslley authored and tj committed May 19, 2011
1 parent a5392d5 commit 89e2047
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/git-ignore
Expand Up @@ -9,7 +9,7 @@ done

if [ ! -z "$template" ]; then
gitignoredir="`dirname $0`/../etc/gitignore"
selected_template=$(find $gitignoredir -type f -name *.gitignore | xargs -i basename {} .gitignore | grep -i $template)
selected_template=$(find $gitignoredir -type f -name *.gitignore | xargs -i basename {} .gitignore | sort | grep $template)
count=$(echo $selected_template | wc -w)
case "$count" in
0) echo "The pattern '$template' does not match any available templates." && exit 1;;
Expand Down

0 comments on commit 89e2047

Please sign in to comment.