Skip to content

wrong path in case of workdirs  #1972

@daschuer

Description

@daschuer

When working with work dirs the conflict check is using the wrong path. This results in a weird error message during a commit with the base worktree in conflict.

[INFO] Checking merge-conflict files only.
An unexpected error has occurred: CalledProcessError: command: ('/usr/lib/git-core/git', 'diff', '--name-only', '--no-ext-diff', '-z', '-m', 'e8fb6f96dfe86b454ceb6913a3e02f88a9103565', 'HEAD', 'MERGE_HEAD')
return code: 128
expected return code: 0
stdout: (none)
stderr:
    fatal: mehrdeutiges Argument 'MERGE_HEAD': unbekannter Commit oder Pfad existiert nicht
    im Arbeitsverzeichnis
    Benutzen Sie '--', um Pfade und Commits zu trennen, ähnlich wie:
    'git <Befehl> [<Commit>...] -- [<Datei>...]'
    
Check the log at /home/sperry/.cache/pre-commit/pre-commit.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions