whereused: Fix display of branch:file when run in a subdirectory

The file needs to be relative to the top of the repository
in that case, but it was relative to the subdir.

Sponsored-by: Luke Shumaker on Patreon
This commit is contained in:
Joey Hess 2023-04-12 15:18:04 -04:00
parent 275d974120
commit 160d4c9254
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 2 additions and 1 deletions

View file

@ -16,6 +16,7 @@ git-annex (10.20230408) UNRELEASED; urgency=medium
control characters, besides the escape sequences it already rejected.
* init: Avoid autoenabling special remotes that have control characters
in their names.
* whereused: Fix display of branch:file when run in a subdirectory.
-- Joey Hess <id@joeyh.name> Sat, 08 Apr 2023 13:57:18 -0400

View file

@ -120,7 +120,7 @@ findHistorical key = do
process fs a = or <$> forM fs a
displayreffile r f = do
let tf = asTopFilePath f
tf <- inRepo $ toTopFilePath f
display key (descBranchFilePath (BranchFilePath r tf))
return True