diff --git a/read-cache.c b/read-cache.c index a92b25b59b..9ee125597e 100644 --- a/read-cache.c +++ b/read-cache.c @@ -257,7 +257,8 @@ static int ce_match_stat_basic(struct cache_entry *ce, struct stat *st) static int is_racy_timestamp(const struct index_state *istate, struct cache_entry *ce) { - return (istate->timestamp && + return (!S_ISGITLINK(ce->ce_mode) && + istate->timestamp && ((unsigned int)istate->timestamp) <= ce->ce_mtime); } diff --git a/t/t7506-status-submodule.sh b/t/t7506-status-submodule.sh index 8987c9eb70..a75130cdbb 100755 --- a/t/t7506-status-submodule.sh +++ b/t/t7506-status-submodule.sh @@ -30,7 +30,7 @@ test_expect_success 'status clean (empty submodule dir)' ' git status | grep "nothing to commit" ' -test_expect_failure 'status -a clean (empty submodule dir)' ' +test_expect_success 'status -a clean (empty submodule dir)' ' git status -a | grep "nothing to commit" '