Thomas Gummerer [off-list ref] writes:
The new git racy code uses the mtime of cache-entries to smudge
a racy clean entry, and loads the work, of checking the file-system
-ECANTPARSE.
if the entry has really changed, off to the reader. This interferes
with this test, because the entry is racily smudged and thus has
mtime 0. We wait 1 second to avoid smudging the entry and getting
correct test results.
Mild NAK, especially it is totally unclear why you even need to muck
with racy-git check in the current format of the index in the first
place, and even if it were necessary, it is unclear why this cannot
be done with test-chmtime.
quoted hunk
Signed-off-by: Thomas Gummerer <redacted>
---
t/t3700-add.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 874b3a6..4d70805 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -184,6 +184,7 @@ test_expect_success 'git add --refresh with pathspec' '
echo >foo && echo >bar && echo >baz &&
git add foo bar baz && H=$(git rev-parse :foo) && git rm -f foo &&
echo "100644 $H 3 foo" | git update-index --index-info &&
+ sleep 1 &&
test-chmtime -60 bar baz &&
>expect &&
git add --refresh bar >actual &&
On 08/05, Junio C Hamano wrote:
Thomas Gummerer [off-list ref] writes:
quoted
The new git racy code uses the mtime of cache-entries to smudge
a racy clean entry, and loads the work, of checking the file-system
-ECANTPARSE.
The git racy code for index-v5 uses the mtime of the cache-entries as
smudge markers. The work of checking the file-system is loaded of to
the reader.
quoted
if the entry has really changed, off to the reader. This interferes
with this test, because the entry is racily smudged and thus has
mtime 0. We wait 1 second to avoid smudging the entry and getting
correct test results.
Mild NAK, especially it is totally unclear why you even need to muck
with racy-git check in the current format of the index in the first
place, and even if it were necessary, it is unclear why this cannot
be done with test-chmtime.
The racy-git code needs to be changed, to avoid problems when implementing
the partial writing for index-v5. Otherwise it could cause problems, when
we have entries that should be smudged, but are not due to the different
racy algorithms.
I'll do it with test-chmtime in the reroll though.
quoted
Signed-off-by: Thomas Gummerer <redacted>
---
t/t3700-add.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/t/t3700-add.sh b/t/t3700-add.sh
index 874b3a6..4d70805 100755
--- a/t/t3700-add.sh
+++ b/t/t3700-add.sh
@@ -184,6 +184,7 @@ test_expect_success 'git add --refresh with pathspec' '
echo >foo && echo >bar && echo >baz &&
git add foo bar baz && H=$(git rev-parse :foo) && git rm -f foo &&
echo "100644 $H 3 foo" | git update-index --index-info &&
+ sleep 1 &&
test-chmtime -60 bar baz &&
>expect &&
git add --refresh bar >actual &&