Skip to content

tig blame should accept absolute paths even when not run from repo root #1391

@ilyagr

Description

@ilyagr

After cloning tig repo into ~/dev, this works: cd ~/dev/tig; tig blame -- $(realpath src/tig.c).

However, the following does not work:

$ cd ~/dev/tig/src; tig blame -- $(realpath tig.c )
tig: No blame exist for src//Users/ilyagr/dev/tig/src/tig.c

I'd like it to work.

I checked this on a recent master, 025d2fb, on Darwin-arm.

The analogous Git command works. I haven't, at this point, looked into whether tig has an analogue of

https://github.com/git/git/blob/6ad802182101d622e6a4132f48292ddfa79e2024/setup.c#L153

The reason I noticed this bug is that I tried to invoke tig blame from a file manager, https://github.com/gokcehan/lf, which tends to use absolute paths (in the $fx environment variable it sets) while also often running the command from the same dir that the file was in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions