@@ -172,7 +172,7 @@ def checker(payload):
172172 )(status_code = 403 )
173173
174174 git .register ("git fetch origin main --depth=1000" )()
175- git .register ("git diff --unified=0 FETCH_HEAD -- . " )(stdout = DIFF_STDOUT )
175+ git .register ("git diff --unified=0 FETCH_HEAD...HEAD " )(stdout = DIFF_STDOUT )
176176
177177 result = main .action (
178178 config = pull_request_config (
@@ -253,7 +253,7 @@ def checker(payload):
253253 )(status_code = 403 )
254254
255255 git .register ("git fetch origin foo --depth=1000" )(stdout = DIFF_STDOUT )
256- git .register ("git diff --unified=0 FETCH_HEAD -- . " )(stdout = DIFF_STDOUT )
256+ git .register ("git diff --unified=0 FETCH_HEAD...HEAD " )(stdout = DIFF_STDOUT )
257257
258258 result = main .action (
259259 config = pull_request_config (
@@ -300,7 +300,7 @@ def test_action__pull_request__post_comment(
300300 session .register ("GET" , "/repos/py-cov-action/foobar/issues/2/comments" )(json = [])
301301
302302 git .register ("git fetch origin main --depth=1000" )()
303- git .register ("git diff --unified=0 FETCH_HEAD -- . " )(stdout = DIFF_STDOUT )
303+ git .register ("git diff --unified=0 FETCH_HEAD...HEAD " )(stdout = DIFF_STDOUT )
304304
305305 comment = None
306306
@@ -347,7 +347,7 @@ def test_action__push__non_default_branch(
347347 json = {"default_branch" : "main" , "visibility" : "public" }
348348 )
349349 git .register ("git fetch origin main --depth=1000" )(stdout = DIFF_STDOUT )
350- git .register ("git diff --unified=0 FETCH_HEAD -- . " )(stdout = DIFF_STDOUT )
350+ git .register ("git diff --unified=0 FETCH_HEAD...HEAD " )(stdout = DIFF_STDOUT )
351351
352352 payload = json .dumps ({"coverage" : 30.00 })
353353 # There is an existing badge in this test, allowing to test the coverage evolution
@@ -436,7 +436,7 @@ def test_action__push__non_default_branch__no_pr(
436436 json = {"default_branch" : "main" , "visibility" : "public" }
437437 )
438438 git .register ("git fetch origin main --depth=1000" )(stdout = DIFF_STDOUT )
439- git .register ("git diff --unified=0 FETCH_HEAD -- . " )(stdout = DIFF_STDOUT )
439+ git .register ("git diff --unified=0 FETCH_HEAD...HEAD " )(stdout = DIFF_STDOUT )
440440
441441 payload = json .dumps ({"coverage" : 30.00 })
442442 # There is an existing badge in this test, allowing to test the coverage evolution
@@ -500,7 +500,7 @@ def test_action__pull_request__force_store_comment(
500500 )(text = payload , headers = {"content-type" : "application/vnd.github.raw+json" })
501501
502502 git .register ("git fetch origin main --depth=1000" )()
503- git .register ("git diff --unified=0 FETCH_HEAD -- . " )(stdout = DIFF_STDOUT )
503+ git .register ("git diff --unified=0 FETCH_HEAD...HEAD " )(stdout = DIFF_STDOUT )
504504
505505 result = main .action (
506506 config = pull_request_config (FORCE_WORKFLOW_RUN = True , GITHUB_OUTPUT = output_file ),
@@ -531,7 +531,7 @@ def test_action__pull_request__post_comment__no_marker(
531531 )(status_code = 404 )
532532
533533 git .register ("git fetch origin main --depth=1000" )()
534- git .register ("git diff --unified=0 FETCH_HEAD -- . " )(stdout = DIFF_STDOUT )
534+ git .register ("git diff --unified=0 FETCH_HEAD...HEAD " )(stdout = DIFF_STDOUT )
535535
536536 result = main .action (
537537 config = pull_request_config (COMMENT_TEMPLATE = """foo""" ),
@@ -556,7 +556,7 @@ def test_action__pull_request__annotations(
556556 )(status_code = 404 )
557557
558558 git .register ("git fetch origin main --depth=1000" )()
559- git .register ("git diff --unified=0 FETCH_HEAD -- . " )(stdout = DIFF_STDOUT )
559+ git .register ("git diff --unified=0 FETCH_HEAD...HEAD " )(stdout = DIFF_STDOUT )
560560
561561 # Who am I
562562 session .register ("GET" , "/user" )(json = {"login" : "foo" })
@@ -598,7 +598,7 @@ def test_action__pull_request__post_comment__template_error(
598598 )(status_code = 404 )
599599
600600 git .register ("git fetch origin main --depth=1000" )()
601- git .register ("git diff --unified=0 FETCH_HEAD -- . " )(stdout = DIFF_STDOUT )
601+ git .register ("git diff --unified=0 FETCH_HEAD...HEAD " )(stdout = DIFF_STDOUT )
602602
603603 result = main .action (
604604 config = pull_request_config (COMMENT_TEMPLATE = """{%""" ),
0 commit comments