diff options
60 files changed, 2124 insertions, 257 deletions
diff --git a/.github/workflows/brew.yml b/.github/workflows/brew.yml index 91d2b848..35e863f5 100644 --- a/.github/workflows/brew.yml +++ b/.github/workflows/brew.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Bump homebrew-core formula - uses: mislav/bump-homebrew-formula-action@v2 + uses: mislav/bump-homebrew-formula-action@v3 env: COMMITTER_TOKEN: ${{ secrets.BREW_TOKEN }} with: diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 13f6aa60..958bcdf1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -4,6 +4,7 @@ on: push: tags: - '*' + workflow_dispatch: jobs: release: @@ -34,6 +35,8 @@ jobs: - name: Build if: matrix.os != 'ubuntu-22.04' + env: + GITUI_RELEASE: 1 run: cargo build - name: Run tests if: matrix.os != 'ubuntu-22.04' @@ -68,15 +71,23 @@ jobs: - name: Build Release Mac if: matrix.os == 'macos-latest' + env: + GITUI_RELEASE: 1 run: make release-mac - name: Build Release Linux if: matrix.os == 'ubuntu-latest' + env: + GITUI_RELEASE: 1 run: make release-linux-musl - name: Build Release Win if: matrix.os == 'windows-latest' + env: + GITUI_RELEASE: 1 run: make release-win - name: Build Release Linux ARM if: matrix.os == 'ubuntu-22.04' + env: + GITUI_RELEASE: 1 run: make release-linux-arm - name: Set SHA @@ -90,7 +101,7 @@ jobs: id: release_notes uses: ffurrer2/extract-release-notes@v2 - name: Release - uses: softprops/action-gh-release@v1 + uses: softprops/action-gh-release@v2 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: @@ -102,7 +113,7 @@ jobs: ./release/*.msi - name: Bump homebrew-core formula - uses: mislav/bump-homebrew-formula-action@v2 + uses: mislav/bump-homebrew-formula-action@v3 if: "matrix.os == 'macos-latest' && !contains(github.ref, '-')" # skip prereleases env: COMMITTER_TOKEN: ${{ secrets.BREW_TOKEN }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d39854f8..453c8a79 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,7 @@ name: CI on: schedule: - - cron: '0 2 * * *' # run at 2 AM UTC + - cron: '0 2 * * *' push: branches: [ '*' ] pull_request: @@ -78,8 +78,8 @@ jobs: run: | cargo install cargo-wix --version 0.3.3 cargo wix --version - cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui.msi - ls -l ./target/wix/gitui.msi + cargo wix -p gitui --no-build --nocapture --output ./target/wix/gitui-win.msi + ls -l ./target/wix/gitui-win.msi build-linux-musl: runs-on: ubuntu-latest @@ -103,7 +103,7 @@ jobs: with: toolchain: ${{ matrix.rust }} targets: x86_64-unknown-linux-musl - + # The build would fail without manually installing the target. # https://github.com/dtolnay/rust-toolchain/issues/83 - name: Manually install target @@ -219,10 +219,10 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@nightly - + - name: build cargo-udeps run: cargo install --git https://github.com/est31/cargo-udeps --locked - + - name: run cargo-udeps run: cargo +nightly udeps --all-targets diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 00000000..ab4cd463 --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,119 @@ +name: Build Nightly Releases + +on: + schedule: + - cron: '0 3 * * *' + workflow_dispatch: + +env: + CARGO_TERM_COLOR: always + AWS_BUCKET_NAME: s3://gitui/nightly/ + +jobs: + release: + strategy: + fail-fast: false + matrix: + os: [ + ubuntu-latest, macos-latest, windows-latest, ubuntu-22.04 + ] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - name: Restore cargo cache + uses: Swatinem/rust-cache@v2 + env: + cache-name: ci + with: + shared-key: ${{ matrix.os }}-${{ env.cache-name }}-stable + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: clippy + + # ideally we trigger the nightly build/deploy only if the normal nightly CI finished successfully + - name: Run tests + if: matrix.os != 'ubuntu-22.04' + run: make test + - name: Run clippy + if: matrix.os != 'ubuntu-22.04' + run: | + cargo clean + make clippy + + - name: Setup MUSL + if: matrix.os == 'ubuntu-latest' + run: | + rustup target add x86_64-unknown-linux-musl + sudo apt-get -qq install musl-tools + + - name: Setup ARM toolchain + if: matrix.os == 'ubuntu-22.04' + run: | + rustup target add aarch64-unknown-linux-gnu + rustup target add armv7-unknown-linux-gnueabihf + rustup target add arm-unknown-linux-gnueabihf + + curl -o $GITHUB_WORKSPACE/aarch64.tar.xz https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu.tar.xz + curl -o $GITHUB_WORKSPACE/arm.tar.xz https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-a/8.2-2018.08/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf.tar.xz + + tar xf $GITHUB_WORKSPACE/aarch64.tar.xz + tar xf $GITHUB_WORKSPACE/arm.tar.xz + + echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-aarch64-linux-gnu/bin" >> $GITHUB_PATH + echo "$GITHUB_WORKSPACE/gcc-arm-8.2-2018.08-x86_64-arm-linux-gnueabihf/bin" >> $GITHUB_PATH + + - name: Build Release Mac + if: matrix.os == 'macos-latest' + run: make release-mac + - name: Build Release Linux + if: matrix.os == 'ubuntu-latest' + run: make release-linux-musl + - name: Build Release Win + if: matrix.os == 'windows-latest' + run: make release-win + - name: Build Release Linux ARM + if: matrix.os == 'ubuntu-22.04' + run: make release-linux-arm + + - name: Ubuntu 22.04 Upload Artifact + if: matrix.os == 'ubuntu-22.04' + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }} + run: | + aws s3 cp ./release/gitui-linux-armv7.tar.gz $AWS_BUCKET_NAME + aws s3 cp ./release/gitui-linux-arm.tar.gz $AWS_BUCKET_NAME + aws s3 cp ./release/gitui-linux-aarch64.tar.gz $AWS_BUCKET_NAME + + - name: Ubuntu Latest Upload Artifact + if: matrix.os == 'ubuntu-latest' + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }} + run: | + aws s3 cp ./release/gitui-linux-x86_64.tar.gz $AWS_BUCKET_NAME + + - name: MacOS Upload Artifact + if: matrix.os == 'macos-latest' + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }} + run: | + aws s3 cp ./release/gitui-mac.tar.gz $AWS_BUCKET_NAME + + - name: Windows Upload Artifact + if: matrix.os == 'windows-latest' + env: + AWS_ACCESS_KEY_ID: ${{ secrets.AWS_KEY_ID }} + AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_KEY_SECRET }} + AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }} + run: | + aws s3 cp ./release/gitui-win.msi $env:AWS_BUCKET_NAME + aws s3 cp ./release/gitui-win.tar.gz $env:AWS_BUCKET_NAME diff --git a/CHANGELOG.md b/CHANGELOG.md index 48560634..271cfcfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,42 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [0.26.0+1] - 2024-04-14 + +**0.26.1** +this release has no changes to `0.26.0` but provides windows binaries that were missing before. + +**commit signing** + +![signing](assets/gitui-signing.png) + +### Added +* sign commits using openpgp [[@hendrikmaus](https://github.com/hendrikmaus)] ([#97](https://github.com/extrawurst/gitui/issues/97)) +* support ssh commit signing (when `user.signingKey` and `gpg.format = ssh` of gitconfig are set; ssh-agent isn't yet supported) [[@yanganto](https://github.com/yanganto)] ([#1149](https://github.com/extrawurst/gitui/issues/1149)) +* provide nightly builds (see [NIGHTLIES.md](./NIGHTLIES.md)) ([#2083](https://github.com/extrawurst/gitui/issues/2083)) +* more version info in `gitui -V` and `help popup` (including git hash) +* support `core.commitChar` filtering [[@concelare](https://github.com/concelare)] ([#2136](https://github.com/extrawurst/gitui/issues/2136)) +* allow reset in branch popup ([#2170](https://github.com/extrawurst/gitui/issues/2170)) +* respect configuration for remote when pushing [[@cruessler](https://github.com/cruessler)] ([#2156](https://github.com/extrawurst/gitui/issues/2156)) + +### Changed +* Make info and error message popups scrollable [[@MichaelAug](https://github.com/MichaelAug)] ([#1138](https://github.com/extrawurst/gitui/issues/1138)) +* clarify `x86_64` linux binary in artifact names: `gitui-linux-x86_64.tar.gz` (formerly known as `musl`) ([#2148](https://github.com/extrawurst/gitui/issues/2148)) + +### Fixes +* add syntax highlighting support for more file types, e.g. Typescript, TOML, etc. [[@martihomssoler](https://github.com/martihomssoler)] ([#2005](https://github.com/extrawurst/gitui/issues/2005)) +* windows release deployment was broken (reason for release `0.26.1`) [218d739](https://github.com/extrawurst/gitui/commit/218d739b035a034b7bf547629d24787909f467bf) + +## [0.25.2] - 2024-03-22 + +### Fixes +* blame sometimes crashed due to new syntax highlighting [[@tdtrung17693](https://github.com/tdtrung17693)] ([#2130](https://github.com/extrawurst/gitui/issues/2130)) +* going to file tree view at certin commit from the commit-details view broke [[@martihomssoler](https://github.com/martihomssoler)] ([#2114](https://github.com/extrawurst/gitui/issues/2114)) +* `0.25` broke creating annotated tags ([#2126](https://github.com/extrawurst/gitui/issues/2126)) + +### Changed +* re-enable clippy `missing_const_for_fn` linter warning and added const to functions where applicable ([#2116](https://github.com/extrawurst/gitui/issues/2116)) + ## [0.25.1] - 2024-02-23 ### Fixes diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..1f5bf305 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# Contributing + +We’re glad you found this document that is intended to make contributing to +GitUI as easy as possible! + +## Building GitUI + +In order to build GitUI on your machine, follow the instructions in the +[“Build” section](./README.md#build). + +## Getting help + +There’s a [Discord server][discord-server] you can join if you get stuck or +don’t know where to start. People are happy to answer any questions you might +have! + +## Getting started + +If you are looking for something to work on, but don’t yet know what might be a +good first issue, you can take a look at [issues labelled with +`good-first-issue`][good-first-issues]. They have been selected to not require +too much context so that people not familiar with the codebase yet can still +make a contribution. + +[discord-server]: https://discord.gg/rZv4uxSQx3 +[good-first-issues]: https://github.com/extrawurst/gitui/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22 @@ -18,6 +18,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] +name = "aead" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" +dependencies = [ + "crypto-common", + "generic-array", +] + +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] +name = "aes-gcm" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1" +dependencies = [ + "aead", + "aes", + "cipher", + "ctr", + "ghash", + "subtle", +] + +[[package]] name = "ahash" version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -115,10 +150,11 @@ checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" [[package]] name = "asyncgit" -version = "0.25.0" +version = "0.26.0" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "crossbeam-channel", + "dirs", "easy-cast", "env_logger", "fuzzy-matcher", @@ -133,6 +169,7 @@ dependencies = [ "scopetime", "serde", "serial_test", + "ssh-key", "tempfile", "thiserror", "unicode-truncate", @@ -161,12 +198,35 @@ dependencies = [ ] [[package]] +name = "base16ct" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" + +[[package]] name = "base64" version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" [[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + +[[package]] +name = "bcrypt-pbkdf" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6aeac2e1fe888769f34f05ac343bbef98b14d1ffb292ab69d4608b3abc86f2a2" +dependencies = [ + "blowfish", + "pbkdf2", + "sha2", +] + +[[package]] name = "bincode" version = "1.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -198,14 +258,42 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.4.2" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" dependencies = [ "serde", ] [[package]] +name = "block-buffer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +dependencies = [ + "generic-array", +] + +[[package]] +name = "block-padding" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" +dependencies = [ + "generic-array", +] + +[[package]] +name = "blowfish" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e412e2cd0f2b2d93e02543ceae7917b3c70331573df19ee046bcbc35e45e87d7" +dependencies = [ + "byteorder", + "cipher", +] + +[[package]] name = "bugreport" version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -232,6 +320,12 @@ dependencies = [ ] [[package]] +name = "byteorder" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] name = "bytesize" version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -244,6 +338,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" [[package]] +name = "cbc" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" +dependencies = [ + "cipher", +] + +[[package]] name = "cc" version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -260,6 +363,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] +name = "chacha20" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", +] + +[[package]] name = "chrono" version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -272,6 +386,16 @@ dependencies = [ ] [[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + +[[package]] name = "clap" version = "4.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -305,12 +429,27 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" [[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + +[[package]] name = "core-foundation-sys" version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] +name = "cpufeatures" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +dependencies = [ + "libc", +] + +[[package]] name = "crc32fast" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -359,7 +498,7 @@ version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" dependencies = [ - "bitflags 2.4.2", + "bitflags 2.5.0", "crossterm_winapi", "libc", "mio", @@ -380,6 +519,64 @@ dependencies = [ ] [[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher", +] + +[[package]] +name = "curve25519-dalek" +version = "4.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest", + "fiat-crypto", + "platforms", + "rustc_version", + "subtle", +] + +[[package]] +name = "curve25519-dalek-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.49", +] + +[[package]] name = "dashmap" version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -393,6 +590,16 @@ dependencies = [ ] [[package]] +name = "der" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" +dependencies = [ + "const-oid", + "zeroize", +] + +[[package]] name = "deranged" version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -408,6 +615,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" [[package]] +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +dependencies = [ + "block-buffer", + "const-oid", + "crypto-common", + "subtle", +] + +[[package]] name = "dirs" version = "5.0.1" |