镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

redirects: remove 358 exact duplicate rules - #1966

Merged
marcleblanc2 merged 1 commit into
mainfrom
marc/redirects/remove-exact-duplicates
Sep 17, 2026
Merged

marcleblanc2 merged 1 commit into
mainfrom
marc/redirects/remove-exact-duplicates

Conversation

@marcleblanc2

@marcleblanc2 marcleblanc2 commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor
  • Site middleware uses the first matching redirect rule it finds

  • This PR removes 358 rules from src/data/redirects.ts which are exact duplicates (same source, destination and flags) of a rule higher up in the file

  • Rules with the same source but a different destination are left untouched; those need a human decision.

  • Most duplicates came from 5e64db1 (Batch Changes Revamp), which appended a near-full copy of the list.

  • Section comments left with no rules under them were removed too.

  • Verified by parsing the file before and after: the ordered list of distinct (source, destination, flags) rules is identical (966 rules)

  • git diff --diff-algorithm=patience shows deletions only (1,637 lines)

  • npx tsc --noEmit reports the same 29 pre-existing errors as main, none in this file

@vercel

vercel Bot commented Sep 16, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
sourcegraph-docs Ready Ready Preview Sep 17, 2026 12:47am UTC

Request Review

@marcleblanc2
marcleblanc2 force-pushed the marc/redirects/remove-exact-duplicates branch from 3440139 to 1efe118 Compare September 17, 2026 00:39
@github-actions

github-actions Bot commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

The middleware picks the first rule whose source matches, so a rule
with the same source and destination as an earlier one can never fire.
Most were added by 5e64db1 (Batch Changes Revamp), which appended a
near-full copy of the list. Removes only rules identical to an earlier
rule (source, destination, flags); the ordered list of distinct rules
is unchanged (966 before and after). Duplicates whose destination
differs from the earlier rule are left alone.

Amp-Thread-ID: https://ampcode.com/threads/T-01a0a75d-51fc-74d7-a322-bd60e7891852
Co-authored-by: Amp <amp@ampcode.com>
@marcleblanc2
marcleblanc2 force-pushed the marc/redirects/remove-exact-duplicates branch from 1efe118 to 7e87e1e Compare September 17, 2026 00:45
@marcleblanc2
marcleblanc2 merged commit c3e7d2e into main Sep 17, 2026
6 checks passed
@marcleblanc2
marcleblanc2 deleted the marc/redirects/remove-exact-duplicates branch September 17, 2026 00:47

This branch was successfully deployed

1 active deployment
Preview — 7e87e1e5 Deployed Sep 17, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants