summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 694a764)
raw | patch | inline | side by side (parent: 694a764)
author | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Oct 2005 07:27:50 +0000 (00:27 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 18 Oct 2005 07:27:50 +0000 (00:27 -0700) |
Recent '--' fixes to "git diff" by Linus made it possible to specify
filenames that start with '-'. But in order to do that, you need to
be able to add and commit such file to begin with.
Teach git-add and git-commit to honor the same '--' convention.
Signed-off-by: Junio C Hamano <junkio@cox.net>
filenames that start with '-'. But in order to do that, you need to
be able to add and commit such file to begin with.
Teach git-add and git-commit to honor the same '--' convention.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-add.sh | patch | blob | history | |
git-commit.sh | patch | blob | history |
diff --git a/git-add.sh b/git-add.sh
index a8498c729ab3188bd21dd6a54ddc77d4c34ac48a..4bf41281d5554f9b1da103b0360eebc411a435eb 100755 (executable)
--- a/git-add.sh
+++ b/git-add.sh
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)
diff --git a/git-commit.sh b/git-commit.sh
index 5bdee54a46b5012d7d5623040cb4c0eab9d7c7ce..96a884f3bcc67563f2e7e1cc3054d24ca51125dd 100755 (executable)
--- a/git-commit.sh
+++ b/git-commit.sh
,0)
;;
*)
- git-diff-files --name-only -z "$@" |
+ git-diff-files --name-only -z -- "$@" |
git-update-index --remove -z --stdin
;;
esac || exit 1