From d40a3580a5d7467d7f7a00ecce21170413da1df7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 3 Apr 2019 13:27:58 -0400 Subject: [PATCH] comment --- ..._875c22110d65c0d8e6ef6aebced87e95._comment | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/forum/Checking_that_everything_is_committed/comment_1_875c22110d65c0d8e6ef6aebced87e95._comment diff --git a/doc/forum/Checking_that_everything_is_committed/comment_1_875c22110d65c0d8e6ef6aebced87e95._comment b/doc/forum/Checking_that_everything_is_committed/comment_1_875c22110d65c0d8e6ef6aebced87e95._comment new file mode 100644 index 0000000000..eb0b6b0c66 --- /dev/null +++ b/doc/forum/Checking_that_everything_is_committed/comment_1_875c22110d65c0d8e6ef6aebced87e95._comment @@ -0,0 +1,23 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 1""" + date="2019-04-03T17:19:36Z" + content=""" +So specifically, this happens for unlocked files in a v7 repository, +but only when the files are empty. + +I suspect this is a bug in git. It might have something to do with +the mention in git-diff-files(1) and git-diff(1) about empty files: + + --ita-invisible-in-index + By default entries added by "git add -N" appear as an existing + empty file in "git diff" and a new file in "git diff --cached". + +And `git diff` similarly shows a diff for these empty unlocked files. + +Makes me suspect there's some hack going on in git WRT empty +files and perhaps it bypasses the smudge/clean filters? + +I usually use `git diff --cached` for this kind of thing, and it doesn't have +the problem, but I don't know if it meets your needs either. +"""]]