forked from spwhitton/git-remote-gcrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
spwhitton/git-remote-gcrypt #2
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
Open
gamesguru
wants to merge
68
commits into
base
Choose a base branch
from
master
base: base
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
23b17ba
feat: Add shell completions, uninstall script, and CLI flags
gamesguru bcb5f36
fix(gpg): Handle ECDH checksum error with many keys
gamesguru 0a9cb67
feat: Add Makefile, CI, and improved testing infrastructure
gamesguru 5146891
linting, testing; coverage reported 63.8%
gamesguru e258c9e
URL resolution logic, clean/check, shell completions
gamesguru 2d03bb0
todo wip
gamesguru e2bd653
fix two bugs with push/clean exiting cowardly
gamesguru 3f9ff06
update/fix stuff. tidy.
gamesguru b2f3f8e
update gitignore
gamesguru 4af2b59
update
gamesguru 061a52a
logic/test fix
gamesguru 96451a4
update completions
gamesguru e436a17
format
gamesguru 2a04a04
lint
gamesguru 9b85a00
lint/bug
gamesguru aa76b1b
more fixes
gamesguru 4eae4d7
update test coverage
gamesguru fc5191a
update installer logic test
gamesguru 0c69ddf
fixes to support installation on Termux (Android)
gamesguru cba9b9d
squash! fixes to support installation on Termux (Android)
gamesguru 487e95b
lint fixes
gamesguru 583a66a
fix kcov errors
gamesguru 1979747
add command to list/stat remote; update completions
gamesguru 0b74ee2
wip fix up stat command and clean
gamesguru 6e53671
handle clean/init cases better
gamesguru 5551a0a
more tweaks/spelling
gamesguru 1c02bac
update clean tests/edge cases
gamesguru bf01c17
update tests
gamesguru 7b6b07d
wip
gamesguru 4497125
tidy completions
gamesguru e36c518
wip
gamesguru 87627aa
repack on init option
gamesguru 9484b87
Update tests & code. Add Android/Termux workflow
gamesguru 881c523
wip
gamesguru 2f0fc74
wip
gamesguru 3fa791c
lint/fixes
gamesguru 0abdfca
fixes/lint. tidy up. polish up.
gamesguru 86ccf93
more fixes/lint/test tidying up.
gamesguru b535af6
fixes?
gamesguru 52096f2
lint/fixes
gamesguru 492906c
macOS fix
gamesguru 29b9047
fixes
gamesguru 9ec0b38
fix termux action
gamesguru 8a3c807
lint & format commands
gamesguru 9d40d9d
fix: termux action and format/generate targets
gamesguru 1d9c21b
fix: use posix-specific syntax in docs generation
gamesguru db9b1fb
lint
gamesguru 93ea385
add compatibility workflow; fix format
gamesguru 8607240
separate/organized workflows; fix lints.
gamesguru c0c98bb
fix coverage, ln not copy!
gamesguru d3f5f79
fix: CI workflows, missing target name
gamesguru a9c6e7e
fix compatibility workflow and tests on older GPG
gamesguru 9b5a0a3
fix
gamesguru 3958fc4
get the compat runners further along
gamesguru e6546b8
fixed kcov
gamesguru 30d6dc4
also should work, more robustly avoid kcov underreporting
gamesguru eea2046
fixes/debugs
gamesguru 1201ad5
save kcov merge?
gamesguru f24031b
add make to compat container tests dependencies
gamesguru 8612d1d
fix?
gamesguru bd1103c
fix?
gamesguru 61d2c0d
more fixes to support container/root mount action
gamesguru 6da1643
fixup! more fixes to support container/root mount action
gamesguru 50d1b6e
fixup! more fixes to support container/root mount action
gamesguru f49256d
squash! more fixes to support container/root mount action
gamesguru e7b3271
fixup! more fixes to support container/root mount action
gamesguru 70beb7a
lint/cubic
gamesguru 68ab09c
fixup! lint/cubic
gamesguru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| [[bash]] | ||
| # For extension-less files (i.e., git-remote-gcrypt) | ||
| indent_style=tab | ||
| indent_size=4 | ||
|
|
||
| [*.sh] | ||
| # For bash scripts with .sh extension | ||
| indent_style=tab | ||
| indent_size=4 | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,106 @@ | ||
| --- | ||
| name: compat | ||
|
|
||
| on: | ||
| pull_request: | ||
| schedule: | ||
| - cron: "0 0 * * 0" # Weekly on Sundays | ||
|
|
||
| jobs: | ||
| # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| # Validate 3 versions of git and GnuPG | ||
| # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| git: | ||
| name: Git & GnuPG | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: ${{ matrix.image }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| image: [ubuntu:20.04, ubuntu:22.04, ubuntu:24.04] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install dependencies (container is root) | ||
| run: | | ||
| apt-get update | ||
| apt-get install -y curl gnupg make git python3-docutils rsync | ||
|
|
||
| - name: Tool versions (check) | ||
cubic-dev-ai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: | | ||
| gpg --version | ||
| git --version | ||
|
|
||
| - name: Run Tests | ||
| run: make test | ||
|
|
||
| # Ubuntu 20.04 | ||
| # gpg (GnuPG) 2.2.19 | ||
| # libgcrypt 1.8.5 | ||
| # Home: /github/home/.gnupg | ||
| # Supported algorithms: | ||
| # Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA | ||
| # Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, | ||
| # CAMELLIA128, CAMELLIA192, CAMELLIA256 | ||
| # Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 | ||
| # Compression: Uncompressed, ZIP, ZLIB, BZIP2 | ||
| # git version 2.25.1 | ||
|
|
||
| # Ubuntu 22.04 | ||
| # gpg (GnuPG) 2.2.27 | ||
| # libgcrypt 1.9.4 | ||
| # Home: /github/home/.gnupg | ||
| # Supported algorithms: | ||
| # Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA | ||
| # Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, | ||
| # CAMELLIA128, CAMELLIA192, CAMELLIA256 | ||
| # Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 | ||
| # Compression: Uncompressed, ZIP, ZLIB, BZIP2 | ||
| # git version 2.34.1 | ||
|
|
||
| # Ubuntu 24.04 | ||
| # gpg (GnuPG) 2.4.4 | ||
| # libgcrypt 1.10.3 | ||
| # Home: /github/home/.gnupg | ||
| # Supported algorithms: | ||
| # Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA | ||
| # Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH, | ||
| # CAMELLIA128, CAMELLIA192, CAMELLIA256 | ||
| # Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224 | ||
| # Compression: Uncompressed, ZIP, ZLIB, BZIP2 | ||
| # git version 2.43.0 | ||
|
|
||
| # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| # Validate completions for bash, zsh, and fish | ||
| # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| shell-bash-zsh-fish: | ||
| name: Shell Completion Syntax | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install Shells | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y zsh fish | ||
|
|
||
| - name: Tool versions (check) | ||
| run: | | ||
| bash --version | ||
| zsh --version | ||
cubic-dev-ai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| fish --version | ||
|
|
||
| - name: Generate Completions (if not up to date) | ||
| run: make generate | ||
|
|
||
| - name: Check Bash Syntax | ||
| run: bash -n completions/bash/git-remote-gcrypt | ||
|
|
||
| - name: Check Zsh Syntax | ||
| run: zsh -n completions/zsh/_git-remote-gcrypt | ||
|
|
||
| - name: Check Fish Syntax | ||
| run: fish --no-execute completions/fish/git-remote-gcrypt.fish | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,60 @@ | ||
| --- | ||
| name: Coverage | ||
|
|
||
| "on": | ||
| push: | ||
| schedule: | ||
| - cron: "0 0 * * 0" # Sunday at 12 AM | ||
|
|
||
| jobs: | ||
| test-coverage: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Checkout Code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Cache kcov | ||
| id: cache-kcov | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /usr/local/bin/kcov | ||
| key: ${{ runner.os }}-kcov-v1 | ||
|
|
||
| # python3-docutils enables rst2man | ||
| - name: Install kcov Dependencies | ||
cubic-dev-ai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y binutils-dev build-essential cmake git \ | ||
| libssl-dev libcurl4-openssl-dev libelf-dev libdw-dev \ | ||
| libiberty-dev zlib1g-dev libstdc++-12-dev \ | ||
| python3-docutils | ||
|
|
||
| # Build & install kcov (on cache miss) | ||
| - name: Build and Install kcov | ||
| if: steps.cache-kcov.outputs.cache-hit != 'true' | ||
| run: | | ||
| git clone --branch v42 --depth 1 https://github.com/SimonKagstrom/kcov.git | ||
| cd kcov | ||
| mkdir build && cd build | ||
| cmake .. | ||
| make -j$(nproc) | ||
| sudo make install | ||
|
|
||
| - name: Check kcov installation | ||
| run: | | ||
| ls -l /usr/local/bin/kcov || echo "Kcov not found!" | ||
| kcov --version | ||
|
|
||
| - name: Test Installer [make test/installer] | ||
| run: make test/installer | ||
|
|
||
| - name: Test System [make test/system] | ||
| run: make test/system | ||
|
|
||
| - name: Upload to Codecov | ||
| uses: codecov/codecov-action@v5 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| # Path changed to match your Makefile's COV_ROOT (.coverage) | ||
| directory: ./.coverage | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,114 @@ | ||
| --- | ||
| name: install | ||
|
|
||
| on: | ||
| push: | ||
| workflow_dispatch: | ||
| inputs: | ||
| debug: | ||
| description: "Enable debug logging (GCRYPT_DEBUG=1)" | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| schedule: | ||
| - cron: "0 0 * * 0" # Sunday at 12 AM | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| # Handles Ubuntu and macOS | ||
| Unix: | ||
| runs-on: ${{ matrix.os }} | ||
|
|
||
| env: | ||
| GCRYPT_DEBUG: ${{ inputs.debug && '1' || '' }} | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Dependencies (Linux) | ||
| if: runner.os == 'Linux' | ||
| run: sudo apt-get update && sudo apt-get install -y git python3-docutils | ||
|
|
||
| - name: Dependencies (macOS) | ||
| if: runner.os == 'macOS' | ||
| run: brew install coreutils python3 git docutils | ||
|
|
||
| - name: Help [make] | ||
| run: make | ||
|
|
||
| - name: Test Installer | ||
| run: bash ./tests/installer-test-logic.sh | ||
|
|
||
| - name: Install [make install] | ||
| run: sudo make install | ||
|
|
||
| - name: Verify [make check/install] | ||
| run: make check/install | ||
|
|
||
| # Handles RedHat (UBI Container) | ||
| RedHat: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| env: | ||
| GCRYPT_DEBUG: ${{ inputs.debug && '1' || '' }} | ||
|
|
||
| container: | ||
| image: registry.access.redhat.com/ubi9/ubi:latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| # dnf is slow in containers. We cache the dnf cache directory. | ||
| - name: Cache DNF | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: /var/cache/dnf | ||
| key: ${{ runner.os }}-ubi9-dnf-v1 | ||
| restore-keys: | | ||
| ${{ runner.os }}-ubi9-dnf- | ||
|
|
||
| - name: Dependencies [redhat] | ||
| run: dnf install -y git python3-docutils make man-db | ||
|
|
||
| - name: Help [make] | ||
| run: make | ||
|
|
||
| - name: Test Installer | ||
| run: bash ./tests/installer-test-logic.sh | ||
|
|
||
| - name: Install [make install] | ||
| run: make install # container runs as sudo | ||
|
|
||
| - name: Verify [make check/install] | ||
| run: make check/install | ||
|
|
||
| # Handles Termux (Android shell) | ||
| termux-android: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Fix permissions for Docker | ||
| run: chmod -R 777 . | ||
gamesguru marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| - name: Run tests in Termux | ||
| run: | | ||
| docker run --rm \ | ||
| -v "$PWD":/app \ | ||
| -w /app \ | ||
| termux/termux-docker:latest \ | ||
| /system/bin/sh -c "export PATH=/data/data/com.termux/files/usr/bin:\$PATH; \ | ||
| apt-get update && \ | ||
| apt-get install -y git make bash python man && \ | ||
| pip install docutils && \ | ||
| make install && \ | ||
| make check/install && \ | ||
| git-remote-gcrypt --version" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| --- | ||
| name: lint | ||
|
|
||
| "on": | ||
cubic-dev-ai[bot] marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| push: | ||
| workflow_dispatch: | ||
| inputs: | ||
| debug: | ||
| description: "Enable debug logging (GCRYPT_DEBUG=1)" | ||
| required: false | ||
| type: boolean | ||
| default: false | ||
| schedule: | ||
| - cron: "0 0 * * 0" # Sunday at 12 AM | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Install ShellCheck | ||
| run: sudo apt-get update && sudo apt-get install -y shellcheck | ||
|
|
||
| - name: Lint [make lint] | ||
| run: make lint | ||
|
|
||
| - name: Check Formatting [make format] | ||
| # Requires shfmt and black. | ||
| # Assuming environment has them or we install them. | ||
| # ubuntu-latest has python3, we need shfmt. | ||
| run: | | ||
| sudo snap install shfmt | ||
| pip3 install black | ||
| make format | ||
| git diff --exit-code | ||
|
|
||
| - name: Check Generation [make generate] | ||
| run: | | ||
| make generate | ||
| git diff --exit-code | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,8 @@ | ||
| /debian/files | ||
| /debian/git-remote-gcrypt.substvars | ||
| /debian/git-remote-gcrypt | ||
|
|
||
| # Test coverage | ||
| .coverage/ | ||
| # scratch pad | ||
| .tmp/ |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.