Thanks to visit codestin.com
Credit goes to github.com

Skip to content

getLastCommitId fails #70

@clindh

Description

@clindh

As the CommandProcessor is putting sinqle quotes around the argument that has double quotes (--pretty=fomat:"%H") to "git log", executed by GitRepository::getLastCommitId, the commit ID is then output with surrounding double quotes

This causes CommitId to throw "Invalid commit ID"

CommandProcessor generates this command,
git log '--pretty=format:"%H"' -n 1
which when executed returns
"8d14d508186179480bc35a5c0ab6d9a0f6db863b"

Had it instead been
git log --pretty=format:"%H" -n 1
or
git log '--pretty=format:%H' -n 1
it would work:
8d14d508186179480bc35a5c0ab6d9a0f6db863b

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