Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/git/git-scm.com.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2022-10-05 17:05:55 +0300
committerJeff King <peff@peff.net>2022-10-05 17:05:55 +0300
commita1b093e6463d3eeaae38938a09dab2fe0007581e (patch)
tree98ab2f989664750efd6ea4062b31f824fe66a8e7
parent46b4ff7df17188762d44b300990cac4ac646d96c (diff)
index_doc(): check command-list.txt with string equality
There's no need to use a regex; we'll always see the full string. This is more accurate, and appeases rubocop (which suggested .includes() for equivalent behavior, but it isn't aware of the possible simplification).
-rw-r--r--lib/tasks/index.rake2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tasks/index.rake b/lib/tasks/index.rake
index 47e35b43..f9b5d727 100644
--- a/lib/tasks/index.rake
+++ b/lib/tasks/index.rake
@@ -206,7 +206,7 @@ def index_doc(filter_tags, doc_list, get_content)
# generate command-list content
generated = {}
- cmd = tag_files.detect { |f| f.first =~ /command-list\.txt/ }
+ cmd = tag_files.detect { |f| f.first == "command-list.txt" }
if cmd
cmd_list =
get_content