git cl split: Use relative path for $description

Do not include the repository path when substituting the $description
variable into the CL description. It is too long, not useful for people
reviewing the CLs, and may include private information.

Change-Id: Ic1a637df42386535c02d77a989ef7997ebf4186d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6562142
Commit-Queue: Adam Rice <ricea@chromium.org>
Reviewed-by: Scott Lee <ddoman@chromium.org>
Reviewed-by: Adam Rice <ricea@google.com>
This commit is contained in:
Adam Rice
2025-05-22 02:31:01 -07:00
committed by LUCI CQ
parent f73c587323
commit b986c3475d

View File

@@ -360,8 +360,9 @@ def GetFilesSplitByOwners(files, max_depth, repository_root):
dir_with_owners = os.path.dirname(dir_with_owners)
files_split_by_owners.setdefault(dir_with_owners, []).append(
(action, path))
files_split_by_owners.setdefault(
os.path.relpath(dir_with_owners, start=repository_root), []).append(
(action, path))
return files_split_by_owners