X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-add.sh;h=b5fe46aa20865d6785390fd22406d32b00a77845;hb=0890098780f295f2a58658d1f6b6627e40426c72;hp=a8498c729ab3188bd21dd6a54ddc77d4c34ac48a;hpb=caf4f582b2bb4d5582540aa49d29749b2600cd03;p=git.git diff --git a/git-add.sh b/git-add.sh index a8498c72..b5fe46aa 100755 --- a/git-add.sh +++ b/git-add.sh @@ -1,5 +1,9 @@ #!/bin/sh +usage() { + die "usage: git add [-n] [-v] ..." +} + show_only= verbose= while : ; do @@ -10,6 +14,9 @@ while : ; do -v) verbose=--verbose ;; + -*) + usage + ;; *) break ;; @@ -23,10 +30,10 @@ 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)