mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Add typo checker
This commit is contained in:
parent
5d7ed18c50
commit
ba9e6f0c5c
1
.github/.ignore_words
vendored
Normal file
1
.github/.ignore_words
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
gool
|
||||
20
.github/workflows/ci.yml
vendored
20
.github/workflows/ci.yml
vendored
|
|
@ -6,15 +6,17 @@ on:
|
|||
branches: [master]
|
||||
jobs:
|
||||
lint:
|
||||
runs-on: 'ubuntu-22.04'
|
||||
runs-on: 'ubuntu-latest'
|
||||
steps:
|
||||
- name: 'Get Changed Files'
|
||||
id: 'files'
|
||||
uses: 'masesgroup/retrieve-changed-files@v2'
|
||||
with:
|
||||
format: 'json'
|
||||
# a force push will cause the action above to fail. Don't do force push when people are
|
||||
# reviewing!
|
||||
- name: Check out code.
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: 'Check EditorConfig Lint'
|
||||
run: |
|
||||
sudo apt install -y jq golang
|
||||
|
|
@ -23,17 +25,27 @@ jobs:
|
|||
readarray -t changed_files <<<"$(jq -r '.[]' <<<'${{ steps.files.outputs.added_modified }}')"
|
||||
~/go/bin/editorconfig-checker ${changed_files[@]}
|
||||
|
||||
typo:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code.
|
||||
uses: actions/checkout@v3
|
||||
- name: spell check
|
||||
run: |
|
||||
pip install codespell==2.2
|
||||
git grep --cached -l '' | grep -v -e 'History\.md' -e 'AUTHORS' -e 'man/.*\.1' -e 'man/.*\.html' | xargs codespell --ignore-words=.github/.ignore_words
|
||||
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- ubuntu-22.04
|
||||
- ubuntu-latest
|
||||
- macos-latest
|
||||
runs-on: ${{ matrix.platform }}
|
||||
steps:
|
||||
- name: Check out code.
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: Linux Install
|
||||
if: matrix.platform == 'ubuntu-22.04'
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -176,8 +176,8 @@ authors :
|
|||
1 Guillermo Rauch 0.6%
|
||||
```
|
||||
|
||||
This command can also take a *commitish*, and will print a summary for commits in
|
||||
the commitish range:
|
||||
This command can also take a *committish*, and will print a summary for commits in
|
||||
the committish range:
|
||||
|
||||
```bash
|
||||
$ git summary v42..
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
echo -n "Sure? - This command may delete files that cannot be recovered. Files and directories in .gitignore will be preserved [y/N]: "
|
||||
read -r ans
|
||||
if [ "$ans" == "y" ]
|
||||
read -r answer
|
||||
if [ "$answer" == "y" ]
|
||||
then git clean -d -f && git reset --hard
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -227,7 +227,7 @@ git_output() {
|
|||
echo ""
|
||||
fi
|
||||
fi
|
||||
# TODO optimize:return if the latest commit of a branch is eariler than the 'since' day
|
||||
# TODO optimize:return if the latest commit of a branch is earlier than the 'since' day
|
||||
done
|
||||
else
|
||||
# shellcheck disable=SC2086
|
||||
|
|
|
|||
|
|
@ -195,7 +195,7 @@ uncommitted_changes_count() {
|
|||
}
|
||||
|
||||
|
||||
COLUMN_CMD_DELIMTER="¬" # Hopefully, this symbol is not used in branch names... I use it as a seperator for columns
|
||||
COLUMN_CMD_DELIMTER="¬" # Hopefully, this symbol is not used in branch names... I use it as a separator for columns
|
||||
SP="$COLUMN_CMD_DELIMTER|"
|
||||
|
||||
print_summary_by_line() {
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-MAGIC" "1" "October 2021" "" "Git Extras"
|
||||
.TH "GIT\-MAGIC" "1" "May 2023" "" "Git Extras"
|
||||
.
|
||||
.SH "NAME"
|
||||
\fBgit\-magic\fR \- Automate add/commit/push routines
|
||||
|
|
@ -10,7 +10,7 @@
|
|||
\fBgit\-magic\fR [\-a] [\-m \fImsg\fR] [\-e] [\-p] [\-f]
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
Produces summary of changes for commit message from \fBgit status \-\-porcelain\fR output\. Commits staged changes with the generated commit message and opens editor to modify generated commit message optionally\. Also staging and pushing can be automated optinally\.
|
||||
Produces summary of changes for commit message from \fBgit status \-\-porcelain\fR output\. Commits staged changes with the generated commit message and opens editor to modify generated commit message optionally\. Also staging and pushing can be automated optionally\.
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
\-a
|
||||
|
|
@ -93,7 +93,7 @@ Date: Thu Sep 30 20:14:22 2021 +0300
|
|||
.IP "" 0
|
||||
.
|
||||
.SH "AUTHOR"
|
||||
Written by Alper S\. Soylu \fI54alpersaid@gmail\.com\fR
|
||||
Written by Alper S\. Soylu <54alpersaid@gmail\.com>
|
||||
.
|
||||
.SH "REPORTING BUGS"
|
||||
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@
|
|||
<p>Produces summary of changes for commit message from <code>git status --porcelain</code> output.
|
||||
Commits staged changes with the generated commit message and
|
||||
opens editor to modify generated commit message optionally.
|
||||
Also staging and pushing can be automated optinally.</p>
|
||||
Also staging and pushing can be automated optionally.</p>
|
||||
|
||||
<h2 id="OPTIONS">OPTIONS</h2>
|
||||
|
||||
|
|
@ -145,7 +145,7 @@ Date: Thu Sep 30 20:14:22 2021 +0300
|
|||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Alper S. Soylu <a href="mailto:54alpersaid@gmail.com" data-bare-link="true">54alpersaid@gmail.com</a></p>
|
||||
<p>Written by Alper S. Soylu <54alpersaid@gmail.com></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -158,7 +158,7 @@ Date: Thu Sep 30 20:14:22 2021 +0300
|
|||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>October 2021</li>
|
||||
<li class='tc'>May 2023</li>
|
||||
<li class='tr'>git-magic(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ git-magic(1) -- Automate add/commit/push routines
|
|||
Produces summary of changes for commit message from `git status --porcelain` output.
|
||||
Commits staged changes with the generated commit message and
|
||||
opens editor to modify generated commit message optionally.
|
||||
Also staging and pushing can be automated optinally.
|
||||
Also staging and pushing can be automated optionally.
|
||||
|
||||
## OPTIONS
|
||||
|
||||
|
|
|
|||
|
|
@ -1,86 +1,58 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "GIT\-SUMMARY" "1" "February 2023" "" "Git Extras"
|
||||
.
|
||||
.\" generated with Ronn-NG/v0.9.1
|
||||
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
|
||||
.TH "GIT\-SUMMARY" "1" "June 2023" "" "Git Extras"
|
||||
.SH "NAME"
|
||||
\fBgit\-summary\fR \- Show repository summary
|
||||
.
|
||||
.SH "SYNOPSIS"
|
||||
\fBgit\-summary\fR [\-\-dedup\-by\-email] [\-\-no\-merges] [<committish>]
|
||||
.
|
||||
.br
|
||||
.P
|
||||
\fBgit\-summary\fR \-\-line [<path>]
|
||||
.
|
||||
.SH "DESCRIPTION"
|
||||
Shows a summary of the repository or a path within it\.
|
||||
.
|
||||
.SH "OPTIONS"
|
||||
<committish>
|
||||
.
|
||||
.P
|
||||
Summarize only the range of commits included in the <committish>\.
|
||||
.
|
||||
.P
|
||||
<path>
|
||||
.
|
||||
.P
|
||||
Summarize only the range of files included in the <path>\.
|
||||
.
|
||||
.P
|
||||
\-\-dedup\-by\-email
|
||||
.
|
||||
.P
|
||||
Remove duplicate authors who belong to the same email address\. For example,
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
$ git summary
|
||||
\.\.\.
|
||||
\|\.\|\.\|\.
|
||||
133 TJ Holowaychuk 9\.9%
|
||||
115 Tj Holowaychuk 8\.5%
|
||||
|
||||
$ git summary \-\-dedup\-by\-email
|
||||
\.\.\.
|
||||
\|\.\|\.\|\.
|
||||
248 TJ Holowaychuk 18\.4%
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
\-\-no\-merges
|
||||
.
|
||||
.P
|
||||
Exclude merge commits\.
|
||||
.
|
||||
.P
|
||||
\-\-line
|
||||
.
|
||||
.P
|
||||
Summarize with lines other than commits\. When \fB\-\-line\fR is specified, the last argument is treated as <path>\.
|
||||
.
|
||||
.P
|
||||
This option can not be used together with \fB\-\-dedup\-by\-email\fR or \fB\-\-no\-merges\fR\.
|
||||
.
|
||||
.P
|
||||
\-\-output\-style <style>
|
||||
.
|
||||
.P
|
||||
Summarizes the repository and print the output accoring to the specified style\. Styles: * \fBtabular\fR: Prints the summary in a tabular form having a header in the first line and the values in the second\. Column separator is a \fB|\fR sorrounded by at least one space on each side\. * \fBoneline\fR: Prints the summary in a single line\. Fields are separated by a \fB/\fR sorrounded by one space on each side\.
|
||||
.
|
||||
Summarizes the repository and print the output according to the specified style\. Styles: * \fBtabular\fR: Prints the summary in a tabular form having a header in the first line and the values in the second\. Column separator is a \fB|\fR sorrounded by at least one space on each side\. * \fBoneline\fR: Prints the summary in a single line\. Fields are separated by a \fB/\fR sorrounded by one space on each side\.
|
||||
.P
|
||||
Some information like the authors cannot be displayed in this mode\.
|
||||
.
|
||||
.SH "EXAMPLES"
|
||||
Outputs a repo summary:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
$ git summary
|
||||
|
||||
project : express
|
||||
|
|
@ -110,94 +82,59 @@ authors :
|
|||
1 ewoudj
|
||||
1 isaacs
|
||||
1 Matt Colyer
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
This command can also take a committish, and will print a summary for the range of commits included in the committish:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
$ git summary v42\.\.
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Outputs a repo summary by line:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
$ git summary \-\-line
|
||||
|
||||
project : git\-extras
|
||||
lines : 26820
|
||||
authors :
|
||||
\.\.\.
|
||||
.
|
||||
\|\.\|\.\|\.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Filter with the path:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
$ git summary \-\-line bin/
|
||||
|
||||
project : git\-extras
|
||||
lines : 4420
|
||||
authors :
|
||||
\.\.\.
|
||||
.
|
||||
\|\.\|\.\|\.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Tabular summary
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
$ git summary \-\-output\-style tabular
|
||||
# Repo | Age | Last active | Active on | Commits | Uncommitted | Branch
|
||||
git\-extras | 13 years | 7 hours ago | 807 days | 1703 | 3 | master
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Oneline summary
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
$ git summary \-\-output\-style oneline
|
||||
git\-extras / age: 13 years / last active: 7 hours ago / active on 807 days / commits: 1703 / uncommitted: 3 / branch: master
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "AUTHOR"
|
||||
Written by Tj Holowaychuk <\fItj@vision\-media\.ca\fR>
|
||||
.
|
||||
.SH "REPORTING BUGS"
|
||||
<\fIhttps://github\.com/tj/git\-extras/issues\fR>
|
||||
.
|
||||
.SH "SEE ALSO"
|
||||
<\fIhttps://github\.com/tj/git\-extras\fR>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv='content-type' value='text/html;charset=utf8'>
|
||||
<meta name='generator' value='Ronn/v0.7.3 (http://github.com/rtomayko/ronn/tree/0.7.3)'>
|
||||
<meta http-equiv='content-type' content='text/html;charset=utf8'>
|
||||
<meta name='generator' content='Ronn-NG/v0.9.1 (http://github.com/apjanke/ronn-ng/tree/0.9.1)'>
|
||||
<title>git-summary(1) - Show repository summary</title>
|
||||
<style type='text/css' media='all'>
|
||||
/* style: man */
|
||||
|
|
@ -69,15 +69,17 @@
|
|||
<li class='tr'>git-summary(1)</li>
|
||||
</ol>
|
||||
|
||||
<h2 id="NAME">NAME</h2>
|
||||
|
||||
|
||||
<h2 id="NAME">NAME</h2>
|
||||
<p class="man-name">
|
||||
<code>git-summary</code> - <span class="man-whatis">Show repository summary</span>
|
||||
</p>
|
||||
|
||||
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
||||
|
||||
<p> <code>git-summary</code> [--dedup-by-email] [--no-merges] [<committish>]<br />
|
||||
<code>git-summary</code> --line [<path>]</p>
|
||||
<p><code>git-summary</code> [--dedup-by-email] [--no-merges] [<committish>]</p>
|
||||
|
||||
<p><code>git-summary</code> --line [<path>]</p>
|
||||
|
||||
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
||||
|
||||
|
|
@ -85,17 +87,17 @@
|
|||
|
||||
<h2 id="OPTIONS">OPTIONS</h2>
|
||||
|
||||
<p> <committish></p>
|
||||
<p><committish></p>
|
||||
|
||||
<p> Summarize only the range of commits included in the <committish>.</p>
|
||||
<p>Summarize only the range of commits included in the <committish>.</p>
|
||||
|
||||
<p> <path></p>
|
||||
<p><path></p>
|
||||
|
||||
<p> Summarize only the range of files included in the <path>.</p>
|
||||
<p>Summarize only the range of files included in the <path>.</p>
|
||||
|
||||
<p> --dedup-by-email</p>
|
||||
<p>--dedup-by-email</p>
|
||||
|
||||
<p> Remove duplicate authors who belong to the same email address.
|
||||
<p>Remove duplicate authors who belong to the same email address.
|
||||
For example,</p>
|
||||
|
||||
<pre><code>$ git summary
|
||||
|
|
@ -108,20 +110,20 @@ $ git summary --dedup-by-email
|
|||
248 TJ Holowaychuk 18.4%
|
||||
</code></pre>
|
||||
|
||||
<p> --no-merges</p>
|
||||
<p>--no-merges</p>
|
||||
|
||||
<p> Exclude merge commits.</p>
|
||||
<p>Exclude merge commits.</p>
|
||||
|
||||
<p> --line</p>
|
||||
<p>--line</p>
|
||||
|
||||
<p> Summarize with lines other than commits.
|
||||
<p>Summarize with lines other than commits.
|
||||
When <code>--line</code> is specified, the last argument is treated as <path>.</p>
|
||||
|
||||
<p> This option can not be used together with <code>--dedup-by-email</code> or <code>--no-merges</code>.</p>
|
||||
<p>This option can not be used together with <code>--dedup-by-email</code> or <code>--no-merges</code>.</p>
|
||||
|
||||
<p> --output-style <style></p>
|
||||
<p>--output-style <style></p>
|
||||
|
||||
<p> Summarizes the repository and print the output accoring to the specified style.
|
||||
<p>Summarizes the repository and print the output according to the specified style.
|
||||
Styles:
|
||||
* <code>tabular</code>: Prints the summary in a tabular form having a header in the
|
||||
first line and the values in the second. Column separator is a <code>|</code>
|
||||
|
|
@ -129,11 +131,11 @@ $ git summary --dedup-by-email
|
|||
* <code>oneline</code>: Prints the summary in a single line. Fields are separated by a <code>/</code>
|
||||
sorrounded by one space on each side.</p>
|
||||
|
||||
<p> Some information like the authors cannot be displayed in this mode.</p>
|
||||
<p>Some information like the authors cannot be displayed in this mode.</p>
|
||||
|
||||
<h2 id="EXAMPLES">EXAMPLES</h2>
|
||||
|
||||
<p> Outputs a repo summary:</p>
|
||||
<p>Outputs a repo summary:</p>
|
||||
|
||||
<pre><code>$ git summary
|
||||
|
||||
|
|
@ -166,13 +168,13 @@ authors :
|
|||
1 Matt Colyer
|
||||
</code></pre>
|
||||
|
||||
<p> This command can also take a committish, and will print a summary for the range
|
||||
<p>This command can also take a committish, and will print a summary for the range
|
||||
of commits included in the committish:</p>
|
||||
|
||||
<pre><code>$ git summary v42..
|
||||
</code></pre>
|
||||
|
||||
<p> Outputs a repo summary by line:</p>
|
||||
<p>Outputs a repo summary by line:</p>
|
||||
|
||||
<pre><code>$ git summary --line
|
||||
|
||||
|
|
@ -182,7 +184,7 @@ authors :
|
|||
...
|
||||
</code></pre>
|
||||
|
||||
<p> Filter with the path:</p>
|
||||
<p>Filter with the path:</p>
|
||||
|
||||
<pre><code>$ git summary --line bin/
|
||||
|
||||
|
|
@ -192,14 +194,14 @@ authors :
|
|||
...
|
||||
</code></pre>
|
||||
|
||||
<p> Tabular summary</p>
|
||||
<p>Tabular summary</p>
|
||||
|
||||
<pre><code>$ git summary --output-style tabular
|
||||
# Repo | Age | Last active | Active on | Commits | Uncommitted | Branch
|
||||
git-extras | 13 years | 7 hours ago | 807 days | 1703 | 3 | master
|
||||
</code></pre>
|
||||
|
||||
<p> Oneline summary</p>
|
||||
<p>Oneline summary</p>
|
||||
|
||||
<pre><code>$ git summary --output-style oneline
|
||||
git-extras / age: 13 years / last active: 7 hours ago / active on 807 days / commits: 1703 / uncommitted: 3 / branch: master
|
||||
|
|
@ -207,7 +209,7 @@ git-extras / age: 13 years / last active: 7 hours ago / active on 807 days / com
|
|||
|
||||
<h2 id="AUTHOR">AUTHOR</h2>
|
||||
|
||||
<p>Written by Tj Holowaychuk <<a href="mailto:tj@vision-media.ca" data-bare-link="true">tj@vision-media.ca</a>></p>
|
||||
<p>Written by Tj Holowaychuk <<a href="mailto:tj@vision-media.ca" data-bare-link="true">tj@vision-media.ca</a>></p>
|
||||
|
||||
<h2 id="REPORTING-BUGS">REPORTING BUGS</h2>
|
||||
|
||||
|
|
@ -217,10 +219,9 @@ git-extras / age: 13 years / last active: 7 hours ago / active on 807 days / com
|
|||
|
||||
<p><<a href="https://github.com/tj/git-extras" data-bare-link="true">https://github.com/tj/git-extras</a>></p>
|
||||
|
||||
|
||||
<ol class='man-decor man-foot man foot'>
|
||||
<li class='tl'></li>
|
||||
<li class='tc'>February 2023</li>
|
||||
<li class='tc'>June 2023</li>
|
||||
<li class='tr'>git-summary(1)</li>
|
||||
</ol>
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ git-summary(1) -- Show repository summary
|
|||
|
||||
## SYNOPSIS
|
||||
|
||||
`git-summary` [--dedup-by-email] [--no-merges] [<committish>]
|
||||
`git-summary` --line [<path>]
|
||||
`git-summary` [--dedup-by-email] [--no-merges] [<committish>]
|
||||
|
||||
`git-summary` --line [<path>]
|
||||
|
||||
## DESCRIPTION
|
||||
|
||||
|
|
@ -47,10 +48,10 @@ Shows a summary of the repository or a path within it.
|
|||
|
||||
--output-style <style>
|
||||
|
||||
Summarizes the repository and print the output accoring to the specified style.
|
||||
Summarizes the repository and print the output according to the specified style.
|
||||
Styles:
|
||||
* `tabular`: Prints the summary in a tabular form having a header in the
|
||||
first line and the values in the second. Column separator is a `|`
|
||||
* `tabular`: Prints the summary in a tabular form having a header in the
|
||||
first line and the values in the second. Column separator is a `|`
|
||||
sorrounded by at least one space on each side.
|
||||
* `oneline`: Prints the summary in a single line. Fields are separated by a `/`
|
||||
sorrounded by one space on each side.
|
||||
|
|
|
|||
Loading…
Reference in a new issue