pingcap / website-docs

The next generation of PingCAP Docs. Powered by Gatsby ⚛️.
https://docs.pingcap.com/
MIT License
22 stars 33 forks source link

Version and diff selector for the TiDB system variables #451

Open likidu opened 7 months ago

likidu commented 7 months ago

https://docs.pingcap.com/tidb/dev/system-variables

A PR has been created for this: https://github.com/pingcap/website-docs/pull/445

likidu commented 7 months ago

@lilin90 We can use git diff to compare the same file from two branches and output to a markdown file.

Here is a simple bash for this:

git diff -U6000 --word-diff release-7.4 release-7.1 -- system-variables.md --no-index |\
tail +6  |\
sed 's/\[-/~~/g;s/-]/~~/g;' |\
sed 's/{\+/__/g;s/+}/__/g' > ~/Repos/sys-var-new.md

The -U6000 is just provide the lines to compare, we can use wc -l <file> to calculate the actual lines of the file for each branch and use the greater number to have a more precise value.

Attached the output of this command to see the result.

sys-var-new.md

likidu commented 7 months ago

User further asks about easy-to-find info of deprecated system variables.