Skip to content

Commit 425b8a2

Browse files
Ramsay Jonesgitster
authored andcommitted
t1100-*.sh: Fix an intermittent test failure
In particular, the final test ('flags and then non flags') fails intermittently, depending on how much time elapsed between the invocations of "git commit-tree" when creating the commits which later have their commit id's compared. For example, if the commits for childid-3 and childid-4 are created 1 or more seconds apart, then the commits, which would otherwise be identical, will have different commit id's. In order to make the test reproducible, we remove the variability by setting the author and committer times to a well defined state. We accomplish this with a single call to 'test_tick' at the start of the test. Signed-off-by: Ramsay Jones <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 07a71b8 commit 425b8a2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

t/t1100-commit-tree-options.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ test_expect_success \
4747

4848

4949
test_expect_success 'flags and then non flags' '
50+
test_tick &&
5051
echo comment text |
5152
git commit-tree $(cat treeid) >commitid &&
5253
echo comment text |

0 commit comments

Comments
 (0)