Closed atz closed 11 years ago
add line
if file exists? is this going to work without git
before that?
Not sure what you are asking. This revision is logically the same conditional check as:
if [[ -f $line ]] ; then
git add $line
fi
I understand the conditional, what makes me wonder is that the line of code is:
[ -f $line ] && add $line
rather than:
[ -f $line ] && git add $line
Hah, indeed, that was my intention.
There we go.
There we go, I was wondering if it was just me not understanding something related to Shell Scripting.
Cheers
If there is no file, there is nothing to git add. In practice there is no file when the subdir was otherwise empty.