Skip to content

Commit

Permalink
Clarified comment of when newline should be added
Browse files Browse the repository at this point in the history
Co-authored-by: 罗泽轩 <[email protected]>
  • Loading branch information
tfendin and spacewander authored Dec 30, 2021
1 parent 1164019 commit fff5fde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bin/git-ignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function add_patterns {
echo "Adding pattern(s) to: $1"
local file="${1/#~/$HOME}"
if [ -s "$file" ]; then
# If $file doesn't end with a newline, add one
# If the content of $file doesn't end with a newline, add one
test "$(tail -c 1 "$file")" != "" && echo "" >> "$file"
fi
for pattern in "${@:2}"; do
Expand Down

0 comments on commit fff5fde

Please sign in to comment.