Skip to content

No match for regexp /diff --git (a\/.*) (b\/.*)\n/ #114

@nWidart

Description

@nWidart

Hello,

I would like to use GrumPHP. However after installation, and trying to perform a commit I get the following error:

[Gitonomy\Git\Exception\RuntimeException]                                                    
  No match for regexp /diff --git (a\/.*) (b\/.*)\n/ Upcoming: diff --git c/composer.json i/c

screen shot 2016-07-28 at 16 03 50

I started by posted the issue on the grumphp repository, who suggested me to post here. phpro/grumphp#164 (comment)

Thanks,

Activity

veewee

veewee commented on Aug 1, 2016

@veewee

This error was due to:

git config --global diff.mnemonicprefix true

Maybe it is possible to add support for mnemonic mode or add the configuration option to the diff command?

alexandresalome

alexandresalome commented on Aug 2, 2016

@alexandresalome
Member

You can replace a/b with a class-character : [a-z]

Jutmzg

Jutmzg commented on Apr 24, 2019

@Jutmzg

maybe because you have chars in some files

DanielSiepmann

DanielSiepmann commented on Dec 13, 2022

@DanielSiepmann

I had the same error caused by the same configuration. Would be cool if the commands would send the option so they tell git to work as expected while people can alter their git config to their needs.

tolik518

tolik518 commented on Dec 13, 2022

@tolik518
Contributor

I had the same error caused by the same configuration. Would be cool if the commands would send the option so they tell git to work as expected while people can alter their git config to their needs.

Could you tell me which version of gitlib you are using? @DanielSiepmann

DanielSiepmann

DanielSiepmann commented on Dec 13, 2022

@DanielSiepmann

Sure: v1.3.7 the latest available tag and git version 2.38.1.

Tried to optimize the file paths for copy and paste by changing this setting. PHP is executed with my user as well and broke to the changed setting. I guess it was just unkown that this output can be modified via settings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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

        Participants

        @alexandresalome@DanielSiepmann@nWidart@veewee@tolik518

        Issue actions

          No match for regexp /diff --git (a\/.*) (b\/.*)\n/ · Issue #114 · gitonomy/gitlib