Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🛠 Repo: Cannot clone wiki repo (error: invalid path) #5247

Closed
4 of 5 tasks
mark-wiemer opened this issue Nov 9, 2024 · 2 comments
Closed
4 of 5 tasks

🛠 Repo: Cannot clone wiki repo (error: invalid path) #5247

mark-wiemer opened this issue Nov 9, 2024 · 2 comments
Labels
area: repository tooling concerning ease of contribution status: in triage a maintainer should (re-)triage (review) this issue

Comments

@mark-wiemer
Copy link
Contributor

mark-wiemer commented Nov 9, 2024

Tooling Suggestion Checklist

Overview

While proposing edits to https://github.com/mochajs/mocha/wiki/Third-party-reporters, I wanted to stage my changes for later review. I'm new to GitHub wikis, but I saw there was an option to clone at the bottom right of the page:

Image

When cloning (on Windows, Linux untested), however, git failed to checkout, apparently because the files in the wiki contain colons in their names:

error: invalid path 'HOW-TO:-Correctly-stub-stdout.md'

As a workaround, I'm editing the wikis directly in GitHub, but it'd be nice to be able to propose changes in a more structured way.

Full logs
~/myStuff/repos/mochajs
$ git clone https://github.com/mochajs/mocha.wiki.git
2024-11-08 19:50:02
Cloning into 'mocha.wiki'...
remote: Enumerating objects: 891, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 891 (delta 0), reused 0 (delta 0), pack-reused 888 (from 1)
Receiving objects: 100% (891/891), 104.78 KiB | 1.18 MiB/s, done.
Resolving deltas: 100% (541/541), done.
error: invalid path 'HOW-TO:-Correctly-stub-stdout.md'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

[last: 1s]
~/myStuff/repos/mochajs
$ cd mocha.wiki
2024-11-08 19:50:55
[last: 0s]
~/myStuff/repos/mochajs/mocha.wiki (master)
$ git status
2024-11-08 19:50:57
On branch master
Your branch is up to date with 'origin/master'.

Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        deleted:    Developing-mocha.md
        deleted:    Development-environment-setup.md
        deleted:    HOW-TO:-Correctly-stub-stdout.md
        deleted:    HOW-TO:-Count-assertions.md
        deleted:    HOW-TO:-Find-a-specific-global-leak.md
        deleted:    HOW-TO:-use-environment-variables.md
        deleted:    Home.md
        deleted:    Mess-with-globals.md
        deleted:    Shared-Behaviours.md
        deleted:    Spies.md
        deleted:    Tagging.md
        deleted:    Third-party-UIs.md
        deleted:    Third-party-reporters.md
        deleted:    Using-Mocha-programmatically.md
        deleted:    Using-mocha-with-node-webkit.md
        deleted:    compilers-deprecation.md

[last: 1s]
~/myStuff/repos/mochajs/mocha.wiki (master)
$ git restore --source=HEAD :/
2024-11-08 19:51:12
error: invalid path 'HOW-TO:-Correctly-stub-stdout.md'
error: invalid path 'HOW-TO:-Count-assertions.md'
error: invalid path 'HOW-TO:-Find-a-specific-global-leak.md'
error: invalid path 'HOW-TO:-use-environment-variables.md'
[last: 0s]
~/myStuff/repos/mochajs/mocha.wiki (master)
$

Additional Info

Ref #3104

@mark-wiemer mark-wiemer added area: repository tooling concerning ease of contribution status: in triage a maintainer should (re-)triage (review) this issue labels Nov 9, 2024
@mark-wiemer mark-wiemer changed the title 🛠 Repo: Cannot clone wiki repo 🛠 Repo: Cannot clone wiki repo (error: invalid path) Nov 9, 2024
@mark-wiemer
Copy link
Contributor Author

Looks like running that recommended git restore ... command did copy most files, just not the ones with the colons in the name. But it's still unclear where the wiki is hosted--looks like an invisible repo linked to this one by GitHub magic! Ref About wikis - GitHub Docs

@JoshuaKGoldberg
Copy link
Member

Yeah GitHub Wikis are an oddity. I don't know of any projects that have newly opted to use one in the last ... decade or so. The only ones I personally interact with ever are Mocha and the TypeScript wiki.

In the short term, I think this is unfortunately a wontfix. The wiki is super old and we don't know what resources are linked to the current URLs with :s. We'll need to keep those URLs around.

Long term, I'm not convinced we should keep the wiki as a first-party resource. I do find it super unsettling that it's a classic wiki with no review process for edits. And we already have mochajs.org. Filed #5248.

Thanks for posting!

@JoshuaKGoldberg JoshuaKGoldberg closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: repository tooling concerning ease of contribution status: in triage a maintainer should (re-)triage (review) this issue
Projects
None yet
Development

No branches or pull requests

2 participants