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

Merge git-for-windows/git/wiki #4951

Open
wants to merge 594 commits into
base: main
Choose a base branch
from

Conversation

dscho
Copy link
Member

@dscho dscho commented May 12, 2024

Vandalism of Git for Windows' wiki is not only a disruption, it is annoying and takes a lot of motivation out of this maintainer.

To counter that, here is a proposal to merge the wiki's content into Git for Windows' main repository instead.

Naturally, if we decide to go this route and merge this here PR, we will want to follow up with a merging-rebase that replaces the entire "topic branch" with a single commit. And we would then want to adjust the links that point to the wiki in build-extra and git-for-windows.github.io and whatever other place we have references to the wiki, too.

KexyBiscuit and others added 30 commits February 22, 2019 10:19
…vs to try out the Upstream->GfW->personal release process.
…he fake merge works, and how to 'replace' it.
Totally off topic for Git for Windows.

This reverts commit dc65844.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
SetTrend and others added 23 commits November 3, 2023 15:02
Like any good index, it has an inherent (alphabetical) order.
Unfortunately, this was missed when a new item was added recently.

Using my teutonic thoroughness, I set the order right again.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
…ng for `git.sln` on the `vs/main` branch 👍
…git-for-windows/

In the recent years, Git for Windows' wiki has seen more vandalizing
than helpful contributions, and sadly the bandwidth of Git for Windows'
contributors is such that such destructive behavior is frequently
detected only after a noticeable time.

Let's prevent such disruptions by merging the wiki into
`Documentation/git-for-windows/`, locking down the wiki, and then
replacing each page with a link to its new home.

This commit accomplishes step number one, a trick performed via:

  git pull --allow-unrelated-histories --no-commit \
    -Xsubtree=Documentation/git-for-windows/ \
    https://github.com/git-for-windows/git.wiki.git master

and then fixing it up (because the `-Xsubtree` trick did not work as
expected):

  for f in $(git ls-tree HEAD^2 | sed 's|.*\t||')
  do
    git mv $f Documentation/git-for-windows/
  done

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This file is no longer used after the merge into the main repository.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
These were stale for a while, it would appear.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Since we just merged the wiki into the main repository (to stave off
future vandalism), let's change the links in this here repository so
they point at the new location.

This trick was performed by:

  # Construct `sed` instructions for replacing the basenames of the wiki
  # links with URL-encoded versions that also add the Markdown file
  # extension `.md`, being careful only to replace the actual Markdown
  # _links_ (i.e. the basename must be preceded either by a slash or by
  # an opening parenthesis, and followed by a closing parenthesis or
  # a hash character indicating an anchor).
  extra="$(git -C Documentation/git-for-windows/ ls-files |
    sed -n '/\.md$/{
      s|`|%60|g
      h
      s|'\''|%27|g
      s|(|%28|g
      s|)|%29|g
      x
      s|\.md$||
      s|'\''|&\\&&|g
      s|\.|\\&|g
      G
      s|^|-e '\''s@\\([/(]\\)|
      s|\n|\\([#)]\\)@\\1|
      s|$|\\2@g'\''|
      p
    }' |
    tr '\n' ' '
  )"
  # Edit all files containing links to the Git for Windows wiki
  for f in $(git grep -l git-for-windows/git/wiki)
  do
    eval sed -i "$extra" \
      -e \''s|\(git-for-windows/git/\)wiki/|\1blob/HEAD/Documentation/git-for-windows/|g'\' \
      -e \''s|\(git-for-windows/git/\)wiki|\1blob/HEAD/Documentation/git-for-windows/Home.md|g'\' \
      \'"$f"\'
  done

It will need to be repeated in the `build-extra` and
`git-for-windows.github.io` repositories.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho requested a review from rimrul May 12, 2024 20:08
dscho and others added 2 commits May 15, 2024 21:43
I have updated the FAQ.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@phil-blain
Copy link

Hi @dscho!

it's sad to have to do this, I agree. I have thought of another option that I've seen elsewhere:

  1. lock the wiki down to developers of git-for-windows/git
  2. copy the wiki repository to a new repo e.g. git-for-windows/wiki
  3. accept PRs in git-for-windows/wiki, so that it's easy for people to contribute
  4. periodically sync git-for-windows/wiki with the wiki of git-for-windows/git (e.g. via GitHub actions).

I think it would make contributions easier than having the content directly in the git-for-windows/git repository.

What do you think ?

@dscho
Copy link
Member Author

dscho commented Nov 4, 2024

I have thought of another option that I've seen elsewhere:

  1. lock the wiki down to developers of git-for-windows/git
  2. copy the wiki repository to a new repo e.g. git-for-windows/wiki
  3. accept PRs in git-for-windows/wiki, so that it's easy for people to contribute
  4. periodically sync git-for-windows/wiki with the wiki of git-for-windows/git (e.g. via GitHub actions).

I think it would make contributions easier than having the content directly in the git-for-windows/git repository.

Interesting idea @phil-blain!

We could also consider a variation where we do not lock down the wiki, but present new contributions as PRs in the hypothetical git-for-windows/wiki repository.

But if there is prior art for automation that makes it easy to do it in the way you proposed, that might be the most painless solution. Do you have any concrete pointers?

@dscho
Copy link
Member Author

dscho commented Nov 4, 2024

Do you have any concrete pointers?

I found this Action (which seems to do what I want, but it seems not to be starred often), and NewRelic's wiki-sync-action (which looked good to me until I saw that they don't use it themselves anymore, and that it is a Docker-based Action)...

@dscho
Copy link
Member Author

dscho commented Dec 19, 2024

Apparently I had not had a look in some time...

image

(All reverted via a force-push now.)

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.