The original attempts a regular expression match of the line read against each element of the git array, while yours expects the entire line to match one element exactly.
For this case, an array structure for "git" with a "grep" may work better. Of course, it depends on what the data looks like.
"I'm fairly sure if they took porn off the Internet, there'd only be one website left, and it'd be called 'Bring Back the Porn!'"
-- Dr. Cox, Scrubs
In reply to Re^2: Breaking out of a loop
by NetWallah
in thread Breaking out of a loop
by rodbass63
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |