]> git.madduck.net Git - code/vcsh.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Improve seeg-gitignore to work around git's issues; still not happy
authorRichard Hartmann <richih.mailinglist@gmail.com>
Tue, 22 Nov 2011 18:46:53 +0000 (19:46 +0100)
committerRichard Hartmann <richih.mailinglist@gmail.com>
Tue, 22 Nov 2011 18:46:53 +0000 (19:46 +0100)
vcsh

diff --git a/vcsh b/vcsh
index bcd416c37724b868157a465d90a9a757dd15bef9..d583dbc1a4ec1d0f8966fed25134f6f7aa497feb 100755 (executable)
--- a/vcsh
+++ b/vcsh
@@ -214,12 +214,13 @@ elif [ "$VCSH_COMMAND" = 'seed-gitignore' ]; then
                        [ "$file" = "$new" ] && break
                        file="$new"
                done;
-       done | sort -u | sed 's/^/!/')
+       done | sort -u)
        tempfile=$(mktemp) ||
                (echo "$SELF: fatal: could not create tempfile" && exit 1) 
        echo '*' > "$tempfile"
        for gitignore in $gitignores; do
-               echo "$gitignore" >> "$tempfile"
+               echo "$gitignore" | sed 's/^/!/' >> "$tempfile"
+               [ -d "$gitignore" ] && echo "$gitignore/*" | sed 's/^/!/'>> "$tempfile"
        done
        diff -N "$tempfile" "$HOME/.gitignore.d/$VCSH_REPO_NAME" > /dev/null &&
                rm -f "$tempfile" &&