Index: tools/gn/function_rebase_path.cc |
diff --git a/tools/gn/function_rebase_path.cc b/tools/gn/function_rebase_path.cc |
index 6661d8112b7480fff5fc0f3d8b478da038d9d174..ef5ef40f984046cab216970f62b9eaaac27ea21c 100644 |
--- a/tools/gn/function_rebase_path.cc |
+++ b/tools/gn/function_rebase_path.cc |
@@ -144,7 +144,7 @@ const char kRebasePath_Help[] = |
" relative to the source root, so can't also generate source-absolute\n" |
" paths without more special-cases.\n" |
"\n" |
- "Arguments:\n" |
+ "Arguments\n" |
"\n" |
" input\n" |
" A string or list of strings representing file or directory names\n" |
@@ -175,6 +175,12 @@ const char kRebasePath_Help[] = |
" names will be converted to be relative to the requested output\n" |
" System-absolute paths will be unchanged.\n" |
"\n" |
+ " Whether an output path will end in a slash will match whether the\n" |
+ " corresponding input path ends in a slash. It will return \".\" or\n" |
+ " \"./\" (depending on whether the input ends in a slash) to avoid\n" |
+ " returning empty strings. This means if you want a root path\n" |
+ " (\"//\" or \"/\") not ending in a slash, you can add a dot (\"//.\").\n" |
+ "\n" |
"Example\n" |
"\n" |
" # Convert a file in the current directory to be relative to the build\n" |