diff --git a/pre_commit_hooks/check_merge_conflict.py b/pre_commit_hooks/check_merge_conflict.py
index 5035b6d..6db5efe 100644
--- a/pre_commit_hooks/check_merge_conflict.py
+++ b/pre_commit_hooks/check_merge_conflict.py
@@ -26,9 +26,10 @@ def is_in_merge():
 def detect_merge_conflict(argv=None):
     parser = argparse.ArgumentParser()
     parser.add_argument('filenames', nargs='*')
+    parser.add_argument('--assume-in-merge', action='store_true')
     args = parser.parse_args(argv)
 
-    if not is_in_merge():
+    if not is_in_merge() and not args.assume_in_merge:
         return 0
 
     retcode = 0

Option to force run check-merge-conflict
check-merge-conflict only runs when it detects merge/rebase in progress.
This means it will always pass on CI setups.

Am not sure if this should be fixed specifically for check-merge-conflict or make a generic CI functionality available via [pre-commit](https://github.com/pre-commit/pre-commit/)

diff --git a/tests/check_merge_conflict_test.py b/tests/check_merge_conflict_test.py
index 1045174..b04c70e 100644
--- a/tests/check_merge_conflict_test.py
+++ b/tests/check_merge_conflict_test.py
@@ -128,5 +128,12 @@ def test_ignores_binary_files():
 
 
 def test_does_not_care_when_not_in_a_merge(tmpdir):
-    tmpdir.join('README.md').write('problem\n=======\n')
-    assert detect_merge_conflict(['README.md']) == 0
+    f = tmpdir.join('README.md')
+    f.write_binary(b'problem\n=======\n')
+    assert detect_merge_conflict([str(f.realpath())]) == 0
+
+
+def test_care_when_assumed_merge(tmpdir):
+    f = tmpdir.join('README.md')
+    f.write_binary(b'problem\n=======\n')
+    assert detect_merge_conflict([str(f.realpath()), '--assume-in-merge']) == 1

pip install -e .[dev]
parse_log_pytest
requirements.txt
pytest
3.6
requirements-dev.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
autopep8==2.0.4
certifi==2021.5.30
cfgv==3.3.1
coverage==6.2
distlib==0.3.9
filelock==3.4.1
flake8==2.5.5
identify==2.4.4
importlib-metadata==4.2.0
importlib-resources==5.2.3
iniconfig==1.1.1
mccabe==0.4.0
mock==5.2.0
nodeenv==1.6.0
packaging==21.3
pep8==1.7.1
platformdirs==2.4.0
pluggy==1.0.0
pre-commit==2.17.0
-e git+https://github.com/pre-commit/pre-commit-hooks.git@9bf684c131befc87304489719223db5fb29f9ac7#egg=pre_commit_hooks
py==1.11.0
pycodestyle==2.10.0
pyflakes==1.0.0
pyparsing==3.1.4
pytest==7.0.1
PyYAML==6.0.1
six==1.17.0
toml==0.10.2
tomli==1.2.3
typing_extensions==4.1.1
virtualenv==20.16.2
zipp==3.6.0

name: pre-commit-hooks
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - autopep8==2.0.4
      - cfgv==3.3.1
      - coverage==6.2
      - distlib==0.3.9
      - filelock==3.4.1
      - flake8==2.5.5
      - identify==2.4.4
      - importlib-metadata==4.2.0
      - importlib-resources==5.2.3
      - iniconfig==1.1.1
      - mccabe==0.4.0
      - mock==5.2.0
      - nodeenv==1.6.0
      - packaging==21.3
      - pep8==1.7.1
      - platformdirs==2.4.0
      - pluggy==1.0.0
      - pre-commit==2.17.0
      - py==1.11.0
      - pycodestyle==2.10.0
      - pyflakes==1.0.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - pyyaml==6.0.1
      - six==1.17.0
      - toml==0.10.2
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - virtualenv==20.16.2
      - zipp==3.6.0
prefix: /opt/conda/envs/pre-commit-hooks

tests/check_merge_conflict_test.py::test_care_when_assumed_merge
tests/check_merge_conflict_test.py::test_merge_conflicts_git tests/check_merge_conflict_test.py::test_merge_conflicts_failing[<<<<<<< tests/check_merge_conflict_test.py::test_merge_conflicts_failing[=======\n] tests/check_merge_conflict_test.py::test_merge_conflicts_failing[>>>>>>> tests/check_merge_conflict_test.py::test_merge_conflicts_ok[# tests/check_merge_conflict_test.py::test_merge_conflicts_ok[import tests/check_merge_conflict_test.py::test_merge_conflicts_ok[] tests/check_merge_conflict_test.py::test_ignores_binary_files tests/check_merge_conflict_test.py::test_does_not_care_when_not_in_a_merge
pre_commit_hooks/check_merge_conflict.py
pre_commit_hooks/check_merge_conflict.py