From 160d4c925492bb04c111b45efd2b57ca3a29784d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 12 Apr 2023 15:18:04 -0400 Subject: [PATCH] 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 --- CHANGELOG | 1 + Command/WhereUsed.hs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 5a5581ce4d..53e491a968 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -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 Sat, 08 Apr 2023 13:57:18 -0400 diff --git a/Command/WhereUsed.hs b/Command/WhereUsed.hs index 2ab4b568f7..5f01c9c2a6 100644 --- a/Command/WhereUsed.hs +++ b/Command/WhereUsed.hs @@ -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