summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 958e67c)
raw | patch | inline | side by side (parent: 958e67c)
author | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 Nov 2007 07:25:19 +0000 (23:25 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 23 Nov 2007 07:25:19 +0000 (23:25 -0800) |
If the worktree happened to have a file called HEAD, "diff-index --cached HEAD"
would complain about the ambiguity between revision and path. Avoid it by
using an explicit "--" for disambiguation.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
would complain about the ambiguity between revision and path. Avoid it by
using an explicit "--" for disambiguation.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
templates/hooks--pre-commit | patch | blob | history |
index 18b87309f65be23794b87260e08c547f5deeefce..8b057be30411e3f0074599778666c1254d82329e 100644 (file)
if git-rev-parse --verify HEAD 2>/dev/null
then
- git-diff-index -p -M --cached HEAD
+ git-diff-index -p -M --cached HEAD --
else
# NEEDSWORK: we should produce a diff with an empty tree here
# if we want to do the same verification for the initial import.