[PATCH] Fix update-index --refresh for submodules if stat(2) returns st_size 0
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Jul 21, 2008, 17:35 UTC
- Message-ID
- <20080721173511.GB5387@steel.home>
For example - Cygwin.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com> ---
Can MSys folks please try it? I noticed it when the test t2103-update-index-ignore-missing.sh (the 5th case) started failing.
read-cache.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/read-cache.c b/read-cache.c index a50a851..eb30c20 100644 --- a/read-cache.c +++ b/read-cache.c @@ -281,7 +281,7 @@ int ie_modified(const struct index_state *istate, * the length field is zero. For other cases the ce_size * should match the SHA1 recorded in the index entry. */ - if ((changed & DATA_CHANGED) && ce->ce_size != 0) + if ((changed & DATA_CHANGED) && (ce->ce_size != 0 || S_ISGITLINK(ce->ce_mode))) return changed; changed_fs = ce_modified_check_fs(ce, st);
-- 1.5.6.4.452.g7b2a