From: Richard Hartmann Date: Tue, 23 Apr 2013 11:42:04 +0000 (-0700) Subject: Merge pull request #43 from madduck/anchor-ignores X-Git-Url: https://git.madduck.net/code/vcsh.git/commitdiff_plain/0871cffdcdc55b143c124075dffb1d1b10426ffa?hp=3c5922ad79eaa7cf48fc4f7671544af6f99d3516 Merge pull request #43 from madduck/anchor-ignores Anchor ignore lines --- diff --git a/vcsh b/vcsh index 599d118..b03df7a 100755 --- a/vcsh +++ b/vcsh @@ -258,9 +258,9 @@ write_gitignore() { tempfile=$(mktemp) || fatal "could not create tempfile" 51 echo '*' > "$tempfile" || fatal "could not write to '$tempfile'" 57 for gitignore in $gitignores; do - echo "$gitignore" | sed 's/^/!/' >> "$tempfile" || fatal "could not write to '$tempfile'" 57 + echo "$gitignore" | sed 's@^@!/@' >> "$tempfile" || fatal "could not write to '$tempfile'" 57 if [ x$VCSH_GITIGNORE = x'recursive' ] && [ -d "$gitignore" ]; then - { echo "$gitignore/*" | sed 's/^/!/' >> "$tempfile" || fatal "could not write to '$tempfile'" 57; } + { echo "$gitignore/*" | sed 's@^@!/@' >> "$tempfile" || fatal "could not write to '$tempfile'" 57; } fi done if diff -N "$tempfile" "$VCSH_BASE/.gitignore.d/$VCSH_REPO_NAME" > /dev/null; then