From: Junio C Hamano Date: Wed, 22 Feb 2006 08:35:07 +0000 (-0800) Subject: Merge branch 'fix' X-Git-Tag: v1.3.0-rc1~162 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/752b0fe287185886f9d89ebe126cd2e185d7e063?ds=inline;hp=-c Merge branch 'fix' * fix: git-push: Update documentation to describe the no-refspec behavior. format-patch: pretty-print timestamp correctly. git-add: Add support for --, documentation, and test. --- 752b0fe287185886f9d89ebe126cd2e185d7e063 diff --combined git-add.sh index 13fad820d4,611f152dac..d6a4bc7d09 --- a/git-add.sh +++ b/git-add.sh @@@ -14,6 -14,10 +14,10 @@@ while : ; d -v) verbose=--verbose ;; + --) + shift + break + ;; -*) usage ;; @@@ -24,17 -28,6 +28,17 @@@ shift done +# Check misspelled pathspec +case "$#" in +0) ;; +*) + git-ls-files --error-unmatch --others --cached -- "$@" >/dev/null || { + echo >&2 "Maybe you misspelled it?" + exit 1 + } + ;; +esac + if test -f "$GIT_DIR/info/exclude" then git-ls-files -z \