mirror of
https://github.com/tj/git-extras.git
synced 2026-09-10 07:26:17 -04:00
Use filetimes in check_integrity (#1162)
* check the file times in check_integrity * make no-arguments to check_integrity check all commands, and also make check_integrity run git-utimes first this has the downside that the script now takes a little longer. But the upside that it guarantees more correctness. * update git-extras using the incredible power of the new script, I have detected this was out of date, out of sync, etc
This commit is contained in:
parent
ffee88a246
commit
4d2d393142
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -71,7 +71,7 @@ jobs:
|
||||||
sudo apt-get install -y bsdmainutils
|
sudo apt-get install -y bsdmainutils
|
||||||
- name: Script
|
- name: Script
|
||||||
run: |
|
run: |
|
||||||
./check_integrity.sh $(find bin | cut -b 5- | xargs)
|
./check_integrity.sh
|
||||||
- name: Brew release
|
- name: Brew release
|
||||||
if: matrix.platform == 'macos-latest'
|
if: matrix.platform == 'macos-latest'
|
||||||
run: |
|
run: |
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ Let's say you wish to add a new command. Assuming your new command is named `foo
|
||||||
5. (Optional) Update `./etc/bash_completion.sh`.
|
5. (Optional) Update `./etc/bash_completion.sh`.
|
||||||
6. (Optional) Update `./etc/git-extras.fish`.
|
6. (Optional) Update `./etc/git-extras.fish`.
|
||||||
7. (Optional) Add a test under `./tests`.
|
7. (Optional) Add a test under `./tests`.
|
||||||
8. Run `./check_integrity.sh foo` to check if all done.
|
8. Run `./check_integrity.sh foo` to check if all done. (You may also run `./check_integrity.sh` to check all commands.)
|
||||||
|
|
||||||
You are welcome to open up an issue to discuss new commands or features before opening a pull request.
|
You are welcome to open up an issue to discuss new commands or features before opening a pull request.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,11 @@ check_documentation() {
|
||||||
err "Create man/$cmd.1 and man/$cmd.html via $(make_doc "$1")"
|
err "Create man/$cmd.1 and man/$cmd.html via $(make_doc "$1")"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "man/$cmd.md" -nt "man/$cmd.1" ] || [ "man/$cmd.md" -nt "man/$cmd.html" ]
|
||||||
|
then
|
||||||
|
err "man/$cmd.md, man/$cmd.1, and man/$cmd.html all exist, but man/$cmd.md is newer. You should rm man/$cmd.1 man/$cmd.html and then create man/$cmd.1 and man/$cmd.html via $(make_doc "$1")"
|
||||||
|
fi
|
||||||
|
|
||||||
check_git_extras_cmd_list "$@"
|
check_git_extras_cmd_list "$@"
|
||||||
check_man_page_index "$@"
|
check_man_page_index "$@"
|
||||||
}
|
}
|
||||||
|
|
@ -77,12 +82,9 @@ check() {
|
||||||
check_completion "$1"
|
check_completion "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
usage() {
|
test $# == 0 && set -- $(find bin | cut -b 5- | xargs)
|
||||||
echo >&2 "Usage: ./check_integrity.sh <command-name> [<command-name2> ...]"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
test $# == 0 && usage
|
./bin/git-utimes --newer
|
||||||
|
|
||||||
for name in "$@"; do
|
for name in "$@"; do
|
||||||
name=${name#git-}
|
name=${name#git-}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
.\" generated with Ronn-NG/v0.9.1
|
.\" generated with Ronn-NG/v0.9.1
|
||||||
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
|
.\" http://github.com/apjanke/ronn-ng/tree/0.9.1
|
||||||
.TH "GIT\-EXTRAS" "1" "May 2023" "" "Git Extras"
|
.TH "GIT\-EXTRAS" "1" "September 2024" "" "Git Extras"
|
||||||
.SH "NAME"
|
.SH "NAME"
|
||||||
\fBgit\-extras\fR \- Awesome GIT utilities
|
\fBgit\-extras\fR \- Awesome GIT utilities
|
||||||
.SH "SYNOPSIS"
|
.SH "SYNOPSIS"
|
||||||
|
|
@ -127,6 +127,8 @@ Change the default branch to \fB$BRANCH\fR\. If \fBgit\-extras\.default\-branch\
|
||||||
.IP "\[ci]" 4
|
.IP "\[ci]" 4
|
||||||
\fBgit\-rename\-branch(1)\fR rename local branch and push to remote
|
\fBgit\-rename\-branch(1)\fR rename local branch and push to remote
|
||||||
.IP "\[ci]" 4
|
.IP "\[ci]" 4
|
||||||
|
\fBgit\-rename\-file(1)\fR Rename a file or directory and ensure Git recognizes the change, regardless of filesystem case\-sensitivity\.
|
||||||
|
.IP "\[ci]" 4
|
||||||
\fBgit\-rename\-remote(1)\fR Rename a remote
|
\fBgit\-rename\-remote(1)\fR Rename a remote
|
||||||
.IP "\[ci]" 4
|
.IP "\[ci]" 4
|
||||||
\fBgit\-rename\-tag(1)\fR Rename a tag
|
\fBgit\-rename\-tag(1)\fR Rename a tag
|
||||||
|
|
|
||||||
|
|
@ -209,6 +209,8 @@
|
||||||
<li>
|
<li>
|
||||||
<strong><a class="man-ref" href="git-rename-branch.html">git-rename-branch<span class="s">(1)</span></a></strong> rename local branch and push to remote</li>
|
<strong><a class="man-ref" href="git-rename-branch.html">git-rename-branch<span class="s">(1)</span></a></strong> rename local branch and push to remote</li>
|
||||||
<li>
|
<li>
|
||||||
|
<strong><a class="man-ref" href="git-rename-file.html">git-rename-file<span class="s">(1)</span></a></strong> Rename a file or directory and ensure Git recognizes the change, regardless of filesystem case-sensitivity.</li>
|
||||||
|
<li>
|
||||||
<strong><a class="man-ref" href="git-rename-remote.html">git-rename-remote<span class="s">(1)</span></a></strong> Rename a remote</li>
|
<strong><a class="man-ref" href="git-rename-remote.html">git-rename-remote<span class="s">(1)</span></a></strong> Rename a remote</li>
|
||||||
<li>
|
<li>
|
||||||
<strong><a class="man-ref" href="git-rename-tag.html">git-rename-tag<span class="s">(1)</span></a></strong> Rename a tag</li>
|
<strong><a class="man-ref" href="git-rename-tag.html">git-rename-tag<span class="s">(1)</span></a></strong> Rename a tag</li>
|
||||||
|
|
@ -265,7 +267,7 @@
|
||||||
|
|
||||||
<ol class='man-decor man-foot man foot'>
|
<ol class='man-decor man-foot man foot'>
|
||||||
<li class='tl'></li>
|
<li class='tl'></li>
|
||||||
<li class='tc'>May 2023</li>
|
<li class='tc'>September 2024</li>
|
||||||
<li class='tr'>git-extras(1)</li>
|
<li class='tr'>git-extras(1)</li>
|
||||||
</ol>
|
</ol>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue