Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix revparsing with windows paths in blame example #722

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jun 16, 2021

  1. Fix revparsing with windows paths in blame example

    `revparse_single` uses a git object name and not a file path - that means backslashes must be translated to slashes on windows.
    Otherwise the example fails:
    ```
    E:\dev\git2-rs>.\target\debug\blame.exe examples\blame.rs
    error: the path 'examples\blame.rs' does not exist in the given tree; class=Tree (14); code=NotFound (-3)
    ```
    I reused the `cfg!` conditional from `remote.rs`, but there might be a better way to do that.
    Rémi Garde authored and Rémi Garde committed Jun 16, 2021
    Configuration menu
    Copy the full SHA
    85950e2 View commit details
    Browse the repository at this point in the history