mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Clarified comment of when newline should be added
Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>
This commit is contained in:
parent
11640196b2
commit
fff5fde917
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue