is_racy_timestamp(): do not check timestamp for gitlinks
Because we do not even check the timestamp to determie if a gitlink is up to date or not, triggering the racy-timestamp check for gitlinks does not make sense. This fixes the recently added test in t7506. Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
451244d724
commit
050288d52d
@ -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)
|
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);
|
((unsigned int)istate->timestamp) <= ce->ce_mtime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ test_expect_success 'status clean (empty submodule dir)' '
|
|||||||
git status |
|
git status |
|
||||||
grep "nothing to commit"
|
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 |
|
git status -a |
|
||||||
grep "nothing to commit"
|
grep "nothing to commit"
|
||||||
'
|
'
|
||||||
|
Loading…
Reference in New Issue
Block a user