changeset 44884:d044b66d8429

scmutil: clarify getuipathfn comment Differential Revision: https://phab.mercurial-scm.org/D8600
author Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
date Tue, 26 May 2020 07:03:11 -0400
parents 94f227baa76f
children 1537ce87e3ba
files mercurial/scmutil.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/scmutil.py	Thu May 28 09:51:13 2020 -0400
+++ b/mercurial/scmutil.py	Tue May 26 07:03:11 2020 -0400
@@ -804,8 +804,8 @@
     if relative:
         cwd = repo.getcwd()
         if cwd != b'':
-            # this branch is correct when cwd == b'', ie cwd = repo root,
-            # but it's slower
+            # this branch would work even if cwd == b'' (ie cwd = repo
+            # root), but its generality makes the returned function slower
             pathto = repo.pathto
             return lambda f: pathto(f, cwd)
     if repo.ui.configbool(b'ui', b'slash'):