From 449da36c2fb080d0c72ea812aee53fce5c32adea Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 6 Jan 2016 19:12:57 -0800 Subject: [PATCH] Use a path digest when building blame cache keys Keys have a maximum length of 128, and long paths could cause key lengths to exceed this. Auditors: chad --- .../diffusion/query/blame/DiffusionBlameQuery.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/applications/diffusion/query/blame/DiffusionBlameQuery.php b/src/applications/diffusion/query/blame/DiffusionBlameQuery.php index 4d03b4a143..1c2221eae3 100644 --- a/src/applications/diffusion/query/blame/DiffusionBlameQuery.php +++ b/src/applications/diffusion/query/blame/DiffusionBlameQuery.php @@ -114,7 +114,9 @@ abstract class DiffusionBlameQuery extends DiffusionQuery { continue; } - $map[$path] = "blame({$repository_id}, {$identifier}, {$path}, raw)"; + $path_hash = PhabricatorHash::digestForIndex($path); + + $map[$path] = "blame({$repository_id}, {$identifier}, {$path_hash}, raw)"; } return $map;