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

Prepare for upcoming *.txt -> *.adoc bulk rename #1944

Open
dscho opened this issue Jan 27, 2025 · 10 comments · May be fixed by #1973
Open

Prepare for upcoming *.txt -> *.adoc bulk rename #1944

dscho opened this issue Jan 27, 2025 · 10 comments · May be fixed by #1973

Comments

@dscho
Copy link
Member

dscho commented Jan 27, 2025

There is a proposed patch series to rename the *.txt files in Documentation/ to *.adoc.

Where *.txt files are available, people frequently run various commands to parse and consume them, including tooling for static websites as this one. Which means that such a rename breaks that tooling.

I agree that this would have been a nice feature to add at the beginning of the development of the documentation, but I fear that it is too late to make an incompatible change now. However, as opposed to increasing Git's safety stance, the convenience of a few who want to have syntax highlighting in editors based on the file extension apparently is important enough to merit just such an incompatible change.

This means that script/update-docs.rb will need to be adapted once the tooling here breaks. Or before it. If someone volunteers.

@erikdendekker
Copy link

Just like to point out that the link to the latest release notes (Shown in monitor image on the front page and download page) is now broken because of this. It points to https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.48.1.txt while it should point to https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.48.1.adoc

@dscho
Copy link
Member Author

dscho commented Feb 19, 2025

Just like to point out that the link to the latest release notes (Shown in monitor image on the front page and download page) is now broken because of this. It points to https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.48.1.txt while it should point to https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.48.1.adoc

That's sad. Do you have time to work on this? I currently lack the time.

@dscho
Copy link
Member Author

dscho commented Feb 24, 2025

Just like to point out that the link to the latest release notes (Shown in monitor image on the front page and download page) is now broken because of this. It points to https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.48.1.txt while it should point to https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.48.1.adoc

@erikdendekker you can thank @aeiouaeiouaeiouaeiouaeiouaeiou over in #1954 for fixing this.

@To1ne
Copy link
Contributor

To1ne commented Mar 5, 2025

This means that script/update-docs.rb will need to be adapted once the tooling here breaks. Or before it. If someone volunteers.

@dscho It seems the patch series landed. And 2.49 is around the corner. How hard is the script breaking now? Shall we pick this up?

@dscho
Copy link
Member Author

dscho commented Mar 5, 2025

It seems the patch series landed.

Yep.

And 2.49 is around the corner.

Yep.

How hard is the script breaking now?

$ git rm -r external/docs/ &&
mkdir -p external/docs/content/docs &&
REBUILD_DOC=v2.49.0-rc1 ruby script/update-docs.rb /path/to/git-checkout en &&
find external/docs/ -type f | wc
      2       2      67

For comparison:

$ REBUILD_DOC=v2.48.1 ruby script/update-docs.rb /path/to/git-checkout en
v2.48.1: 2025-01-13 21:57:19 +0100, 6768cd39, 809d7245
Found 251 entries
   build: BreakingChanges
   build: CodingGuidelines
   build: MyFirstContribution
   build: MyFirstObjectWalk
   build: ReviewingGuidelines
   build: SubmittingPatches
   build: diff-format
   build: diff-generate-patch
   build: diff-options
   build: fetch-options
   build: git-add
   build: git-am
   build: git-annotate
   build: git-apply
   build: git-archimport
   build: git-archive
   build: git-bisect-lk2009
   build: git-bisect
   build: git-blame
   build: git-branch
   build: git-bugreport
   build: git-bundle
   build: git-cat-file
   build: git-check-attr
   build: git-check-ignore
   build: git-check-mailmap
   build: git-check-ref-format
   build: git-checkout-index
   build: git-checkout
   build: git-cherry-pick
   build: git-cherry
   build: git-citool
   build: git-clean
   build: git-clone
   build: git-column
   build: git-commit-graph
   build: git-commit-tree
   build: git-commit
   build: git-config
Documentation/config/mergetools-diff.txt could not be resolved for expansion
Documentation/config/mergetools-merge.txt could not be resolved for expansion
   build: git-count-objects
   build: git-credential-cache--daemon
   build: git-credential-cache
   build: git-credential-store
   build: git-credential
   build: git-cvsexportcommit
   build: git-cvsimport
   build: git-cvsserver
   build: git-daemon
   build: git-describe
   build: git-diagnose
   build: git-diff-files
   build: git-diff-index
   build: git-diff-tree
   build: git-diff
Documentation/config/mergetools-diff.txt could not be resolved for expansion
   build: git-difftool
   build: git-fast-export
   build: git-fast-import
   build: git-fetch-pack
   build: git-fetch
   build: git-filter-branch
   build: git-fmt-merge-msg
   build: git-for-each-ref
   build: git-for-each-repo
   build: git-format-patch
   build: git-fsck-objects
   build: git-fsck
   build: git-fsmonitor--daemon
   build: git-gc
   build: git-get-tar-commit-id
   build: git-grep
   build: git-gui
   build: git-hash-object
   build: git-help
   build: git-hook
   build: git-http-backend
   build: git-http-fetch
   build: git-http-push
   build: git-imap-send
   build: git-index-pack
   build: git-init-db
   build: git-init
   build: git-instaweb
   build: git-interpret-trailers
   build: git-log
   build: git-ls-files
   build: git-ls-remote
   build: git-ls-tree
   build: git-mailinfo
   build: git-mailsplit
   build: git-maintenance
   build: git-merge-base
   build: git-merge-file
   build: git-merge-index
   build: git-merge-one-file
   build: git-merge-tree
   build: git-merge
Documentation/config/mergetools-merge.txt could not be resolved for expansion
   build: git-mergetool--lib
   build: git-mergetool
   build: git-mktag
   build: git-mktree
   build: git-multi-pack-index
   build: git-mv
   build: git-name-rev
   build: git-notes
   build: git-p4
   build: git-pack-objects
   build: git-pack-redundant
   build: git-pack-refs
   build: git-patch-id
   build: git-prune-packed
   build: git-prune
   build: git-pull
   build: git-push
   build: git-quiltimport
   build: git-range-diff
   build: git-read-tree
   build: git-rebase
   build: git-receive-pack
   build: git-reflog
   build: git-refs
   build: git-remote-ext
   build: git-remote-fd
   build: git-remote
   build: git-repack
   build: git-replace
   build: git-replay
   build: git-request-pull
   build: git-rerere
   build: git-reset
   build: git-restore
   build: git-rev-list
   build: git-rev-parse
   build: git-revert
   build: git-rm
   build: git-send-email
   build: git-send-pack
   build: git-sh-i18n--envsubst
   build: git-sh-i18n
   build: git-sh-setup
   build: git-shell
   build: git-shortlog
   build: git-show-branch
   build: git-show-index
   build: git-show-ref
   build: git-show
   build: git-sparse-checkout
   build: git-stage
   build: git-stash
   build: git-status
   build: git-stripspace
   build: git-submodule
   build: git-svn
   build: git-switch
   build: git-symbolic-ref
   build: git-tag
   build: git-tools
   build: git-unpack-file
   build: git-unpack-objects
   build: git-update-index
   build: git-update-ref
   build: git-update-server-info
   build: git-upload-archive
   build: git-upload-pack
   build: git-var
   build: git-verify-commit
   build: git-verify-pack
   build: git-verify-tag
   build: git-version
   build: git-web--browse
   build: git-whatchanged
   build: git-worktree
   build: git-write-tree
   build: git
   build: gitattributes
   build: gitcli
   build: gitcore-tutorial
   build: gitcredentials
   build: gitcvs-migration
   build: gitdiffcore
   build: giteveryday
   build: gitfaq
   build: gitformat-bundle
   build: gitformat-chunk
   build: gitformat-commit-graph
   build: gitformat-index
   build: gitformat-pack
   build: gitformat-signature
   build: gitglossary
   build: githooks
   build: gitignore
   build: gitk
   build: gitmailmap
   build: gitmodules
   build: gitnamespaces
   build: gitpacking
   build: gitprotocol-capabilities
   build: gitprotocol-common
   build: gitprotocol-http
   build: gitprotocol-pack
   build: gitprotocol-v2
   build: gitremote-helpers
   build: gitrepository-layout
   build: gitrevisions
   build: gitsubmodules
   build: gittutorial-2
   build: gittutorial
   build: gitweb.conf
   build: gitweb
   build: gitworkflows
   build: merge-options
   build: merge-strategies
   build: vimdiff
   build: pretty-formats
   build: pretty-options
   build: pull-fetch-param
   build: rev-list-description
   build: rev-list-options
   build: revisions
   build: scalar
   build: api-error-handling
   build: api-index-skel
   build: api-merge
   build: api-parse-options
   build: api-simple-ipc
   build: api-trace2
   build: bitmap-format
   build: build-systems
   build: bundle-uri
   build: commit-graph
   build: directory-rename-detection
   build: hash-function-transition
   build: long-running-process-protocol
   build: multi-pack-index
   build: pack-heuristics
   build: packfile-uri
   build: parallel-checkout
   build: partial-clone
   build: platform-support
   build: racy-git
   build: reftable
   build: remembering-renames
asciidoctor: WARNING: <stdin>: line 13: list item index: expected 1, got 0
asciidoctor: WARNING: <stdin>: line 15: list item index: expected 2, got 1
asciidoctor: WARNING: <stdin>: line 17: list item index: expected 3, got 2
asciidoctor: WARNING: <stdin>: line 20: list item index: expected 4, got 3
asciidoctor: WARNING: <stdin>: line 23: list item index: expected 5, got 4
asciidoctor: WARNING: <stdin>: line 25: list item index: expected 6, got 5
asciidoctor: WARNING: <stdin>: line 29: list item index: expected 7, got 6
asciidoctor: WARNING: <stdin>: line 31: list item index: expected 8, got 7
asciidoctor: WARNING: <stdin>: line 33: list item index: expected 9, got 8
asciidoctor: WARNING: <stdin>: line 38: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 94: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 141: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 142: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 184: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 185: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 257: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 288: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 289: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 290: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 397: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 424: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 485: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 486: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 487: section title out of sequence: expected levels 0 or 1, got level 2
   build: repository-version
   build: rerere
   build: send-pack-pipeline
   build: shallow
   build: sparse-checkout
asciidoctor: WARNING: <stdin>: line 17: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 95: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 258: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 303: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 316: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 547: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 614: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 754: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 826: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 897: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 925: section title out of sequence: expected levels 0 or 1, got level 2
asciidoctor: WARNING: <stdin>: line 930: list item index: expected 1, got 0
asciidoctor: WARNING: <stdin>: line 933: list item index: expected 2, got 1
asciidoctor: WARNING: <stdin>: line 953: list item index: expected 3, got 2
asciidoctor: WARNING: <stdin>: line 976: list item index: expected 4, got 3
asciidoctor: WARNING: <stdin>: line 982: list item index: expected 5, got 4
asciidoctor: WARNING: <stdin>: line 1035: list item index: expected 6, got 5
asciidoctor: WARNING: <stdin>: line 1051: list item index: expected 7, got 6
asciidoctor: WARNING: <stdin>: line 1055: section title out of sequence: expected levels 0 or 1, got level 2
   build: sparse-index
   build: trivial-merge
   build: unit-tests
   build: user-manual

$ find external/docs/ -type f | wc
    758     758   41211

And for the record, these lines indicate a regression thanks to the Meson changes:

Documentation/config/mergetools-diff.txt could not be resolved for expansion
Documentation/config/mergetools-merge.txt could not be resolved for expansion

Shall we pick this up?

@To1ne If you have the time and the motivation; I do not.

@To1ne
Copy link
Contributor

To1ne commented Mar 11, 2025

I just noticed we have to make sure not to break permalinks like https://git-scm.com/docs/git-clone#Documentation/git-clone.txt-code--filterltfilter-specgtcode. There's git-clone.txt in that anchor. 😱

@dscho
Copy link
Member Author

dscho commented Mar 11, 2025

I just noticed we have to make sure not to break permalinks like https://git-scm.com/docs/git-clone#Documentation/git-clone.txt-code--filterltfilter-specgtcode. There's git-clone.txt in that anchor. 😱

Well spotted, I missed that!

This .txt -> .adoc rename seems even less thought-through than I originally believed.

@To1ne To1ne linked a pull request Mar 12, 2025 that will close this issue
@To1ne
Copy link
Contributor

To1ne commented Mar 12, 2025

Hah, there are more issues. Derp.

https://lore.kernel.org/git/CAEiLEbOZ7vGE6U69sf5nK+G86zaeAMRTrjaCr=rF2JU1H1p8ww@mail.gmail.com/

Hi Git Community,

The link to the release notes for v2.48.1 on the git-scm downloads
page doesn't seem to be working.

It links to: https://raw.githubusercontent.com/git/git/master/Documentation/RelNotes/2.48.1.txt

It looks like the master branch now uses '.adoc' extension since this
commit: git/git@1f010d6

Using either of these URLs loads the release notes correctly:

@dscho
Copy link
Member Author

dscho commented Mar 12, 2025

@To1ne don't you love the impulsive response "This ain't our problem". As if the millions of links out there to Git's release notes that were in such a consistent format for over a decade so that people had come to rely on it, sometimes in commits (that are immutable) weren't Git's responsibility. I'm speechless.

@dscho
Copy link
Member Author

dscho commented Mar 12, 2025

As for https://git-scm.com/downloads, this seems to have been adjusted in #1954, though.

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 a pull request may close this issue.

3 participants