X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-add.sh;h=f719b4b1a81a386c9cf62efad811005471be0f8c;hb=a325957062b19b49ad75569c59771787c83c350d;hp=a8498c729ab3188bd21dd6a54ddc77d4c34ac48a;hpb=caf4f582b2bb4d5582540aa49d29749b2600cd03;p=git.git diff --git a/git-add.sh b/git-add.sh index a8498c72..f719b4b1 100755 --- a/git-add.sh +++ b/git-add.sh @@ -1,5 +1,9 @@ #!/bin/sh +USAGE='[-n] [-v] ...' +SUBDIRECTORY_OK='Yes' +. git-sh-setup + show_only= verbose= while : ; do @@ -10,6 +14,9 @@ while : ; do -v) verbose=--verbose ;; + -*) + usage + ;; *) break ;; @@ -17,16 +24,14 @@ while : ; do shift done -GIT_DIR=$(git-rev-parse --git-dir) || exit - if test -f "$GIT_DIR/info/exclude" then git-ls-files -z \ --exclude-from="$GIT_DIR/info/exclude" \ - --others --exclude-per-directory=.gitignore "$@" + --others --exclude-per-directory=.gitignore -- "$@" else git-ls-files -z \ - --others --exclude-per-directory=.gitignore "$@" + --others --exclude-per-directory=.gitignore -- "$@" fi | case "$show_only" in true)