Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ouch-org/ouch
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0.4.1
Choose a base ref
...
head repository: ouch-org/ouch
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0.4.2
Choose a head ref
Loading
Showing with 1,225 additions and 720 deletions.
  1. +12 −0 .github/dependabot.yml
  2. +13 −1 .github/workflows/build-and-test.yml
  3. +33 −12 CHANGELOG.md
  4. +553 −275 Cargo.lock
  5. +25 −28 Cargo.toml
  6. +26 −9 README.md
  7. +2 −2 build.rs
  8. +14 −14 src/archive/zip.rs
  9. +228 −0 src/check.rs
  10. +22 −4 src/{opts.rs → cli/args.rs}
  11. +15 −12 src/{cli.rs → cli/mod.rs}
  12. +44 −16 src/commands/compress.rs
  13. +86 −265 src/commands/mod.rs
  14. +5 −2 src/error.rs
  15. +96 −38 src/extension.rs
  16. +34 −31 src/list.rs
  17. +2 −2 src/macros.rs
  18. +3 −5 src/main.rs
  19. +1 −1 src/utils/formatting.rs
  20. +10 −2 tests/integration.rs
  21. +1 −1 tests/utils.rs
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2

updates:
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
14 changes: 13 additions & 1 deletion .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
name: build-and-test

on: [push, pull_request]
on:
push:
branches:
- main
tags:
- "[0-9]+.[0-9]+.[0-9]+"
pull_request:

jobs:
build:
@@ -39,6 +45,11 @@ jobs:
os: windows-latest
ext: .exe

- target: aarch64-pc-windows-msvc
os: windows-latest
ext: .exe
skip-test: true

- target: x86_64-unknown-linux-gnu
os: ubuntu-latest

@@ -75,6 +86,7 @@ jobs:
rustup toolchain install stable nightly --profile minimal -t ${{ matrix.target }}
- name: Test on stable
if: ${{ ! matrix.skip-test }}
run: |
${{ env.CARGO }} +stable test --target ${{ matrix.target }} $EXTRA_CARGO_FLAGS
45 changes: 33 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -18,7 +18,28 @@ Categories Used:

**Bullet points in chronological order by PR**

## [Unreleased](https://github.com/ouch-org/ouch/compare/0.4.1...HEAD)
## [Unreleased](https://github.com/ouch-org/ouch/compare/0.4.2...HEAD)

## [0.4.2](https://github.com/ouch-org/ouch/compare/0.4.1...0.4.2)

### New Features

- Add flags to configure the compression level
- `--level` to precisely set the compression level [\#372](https://github.com/ouch-org/ouch/pull/372) ([xgdgsc](https://github.com/xgdgsc))
- `--fast` and `--slow` [\#374](https://github.com/ouch-org/ouch/pull/374) ([figsoda](https://github.com/figsoda))
- Add `--format` option [\#341](https://github.com/ouch-org/ouch/pull/341) ([figsoda](https://github.com/figsoda))

### Improvements

- Multi-threaded compression for gzip and snappy using gzp [\#348](https://github.com/ouch-org/ouch/pull/348) ([figsoda](https://github.com/figsoda))
- Add `ls` as an alternative alias for listing [\#360](https://github.com/ouch-org/ouch/pull/360) ([orhun](https://github.com/orhun))

### Bug Fixes

- Fix decompression of zip archives with files larger than 4GB [\#354](https://github.com/ouch-org/ouch/pull/354) ([figsoda](https://github.com/figsoda))
- Fix handling of unknown extensions during decompression [\#355](https://github.com/ouch-org/ouch/pull/355) ([figsoda](https://github.com/figsoda))
- Remove remaining mentions of `.lz` that refers to the LZMA format [\#344](https://github.com/ouch-org/ouch/pull/344) ([marcospb19](https://github.com/marcospb19))
- Handle Zip when modification times are missing [\#433](https://github.com/ouch-org/ouch/pull/433) ([marcospb19](https://github.com/marcospb19))

## [0.4.1](https://github.com/ouch-org/ouch/compare/0.4.0...0.4.1)

@@ -33,8 +54,8 @@ Categories Used:
- Improve extension parsing logic [\#330](https://github.com/ouch-org/ouch/pull/330) ([figsoda](https://github.com/figsoda))
- Slight refactor when ensuring archive-only inputs [\#331](https://github.com/ouch-org/ouch/pull/331) ([vrmiguel](https://github.com/vrmiguel))
- Use BStr to display possibly non-UTF8 byte sequences[\#332](https://github.com/ouch-org/ouch/pull/332) ([vrmiguel](https://github.com/vrmiguel))
- Use ubyte instead of humansize #333 [\#333](https://github.com/ouch-org/ouch/pull/333) ([vrmiguel](https://github.com/vrmiguel))
- Stop keeping track of the names of unpacked files [\#334](https://github.com/ouch-org/ouch/pull/334) ([vrmiguel](https://github.com/vrmiguel))
- Use ubyte instead of humansize #333 [\#333](https://github.com/ouch-org/ouch/pull/333) ([vrmiguel](https://github.com/vrmiguel))
- Stop keeping track of the names of unpacked files [\#334](https://github.com/ouch-org/ouch/pull/334) ([vrmiguel](https://github.com/vrmiguel))
- Clean up [\#335](https://github.com/ouch-org/ouch/pull/335) ([figsoda](https://github.com/figsoda))

### Bug fixes
@@ -95,7 +116,7 @@ Categories Used:
- Optimize `strip_cur_dir` [\#167](https://github.com/ouch-org/ouch/pull/167) ([vrmiguel](https://github.com/vrmiguel))
- Improve zip errors when paths are not utf8 valid [\#181](https://github.com/ouch-org/ouch/pull/181) ([marcospb19](https://github.com/marcospb19))
- Simplify/optimize several file inferring functions [\#204](https://github.com/ouch-org/ouch/pull/204) ([vrmiguel](https://github.com/vrmiguel))
- List command: print file immediatly after it is processed [\#225](https://github.com/ouch-org/ouch/pull/225) ([sigmaSd](https://github.com/sigmaSd))
- List command: print file immediately after it is processed [\#225](https://github.com/ouch-org/ouch/pull/225) ([sigmaSd](https://github.com/sigmaSd))
- Use `Cow<'static, str>` in `FinalError` [\#246](https://github.com/ouch-org/ouch/pull/246) ([vrmiguel](https://github.com/vrmiguel))
- Don't allocate when possible in `to_utf`, `nice_directory_display` [\#249](https://github.com/ouch-org/ouch/pull/249) ([vrmiguel](https://github.com/vrmiguel))
- Allow overriding the completions output directory [\#251]](https://github.com/ouch-org/ouch/pull/251) ([jcgruenhage](https://github.com/jcgruenhage))
@@ -162,22 +183,22 @@ Categories Used:
- Migrate from `oof` to `clap` for argument parsing [\#105](https://github.com/ouch-org/ouch/issues/105) & [\#108](https://github.com/ouch-org/ouch/pull/108) ([SpyrosRoum](https://github.com/SpyrosRoum))
- Shell completions & man page [\#122](https://github.com/ouch-org/ouch/pull/122) ([figsoda](https://github.com/figsoda))
- Implement command 'list' to show archive contents [\#129](https://github.com/ouch-org/ouch/pull/129) ([AntonHermann](https://github.com/AntonHermann))
- Print number of unpacked files by [\#130](https://github.com/ouch-org/ouch/pull/130) ([dcariotti](https://github.com/dcariotti))
- Print number of unpacked files by [\#130](https://github.com/ouch-org/ouch/pull/130) ([boozec](https://github.com/boozec))

**Disclaimer: _Our installation script does not support installing man pages and shell completions yet, but PRs are welcome!_**

### Bug Fixes

- Empty folders are ignored in archive compression formats [\#41](https://github.com/ouch-org/ouch/issues/41) ([GabrielSimonetto](https://github.com/GabrielSimonetto))
- fix macOS executable paths [\#69](https://github.com/ouch-org/ouch/pull/69) ([vrmiguel](https://github.com/vrmiguel))
- Print the format type when the format is in an incorrent position [\#84](https://github.com/ouch-org/ouch/pull/84) ([dcariotti](https://github.com/dcariotti))
- Print the format type when the format is in an incorrect position [\#84](https://github.com/ouch-org/ouch/pull/84) ([boozec](https://github.com/boozec))
- Compressing a single file to a single format that's not `tar` or `zip` panics [\#87](https://github.com/ouch-org/ouch/issues/87) & [\#89](https://github.com/ouch-org/ouch/pull/89) ([marcospb19](https://github.com/marcospb19))
- Compression flag `--output` not working with single file compression [\#90](https://github.com/ouch-org/ouch/issues/90) & [\#93](https://github.com/ouch-org/ouch/pull/93) ([figsoda](https://github.com/figsoda))
- Fix NO_COLOR issues, remove some dead code [\#66](https://github.com/ouch-org/ouch/issues/66), [\#62](https://github.com/ouch-org/ouch/issues/62), & [\#95](https://github.com/ouch-org/ouch/pull/95) ([figsoda](https://github.com/figsoda))
- Add proper error message when using conflicting flags \(e.g. `--yes --no`\) [\#55](https://github.com/ouch-org/ouch/issues/55) & [\#99](https://github.com/ouch-org/ouch/pull/99) ([SpyrosRoum](https://github.com/SpyrosRoum))
- Fix wrong archive format detection patterns [\#125](https://github.com/ouch-org/ouch/pull/125) ([SpyrosRoum](https://github.com/SpyrosRoum))
- Decompressing file without extension gives bad error message [\#137](https://github.com/ouch-org/ouch/issues/137) ([marcospb19](https://github.com/marcospb19))
- Fix decompression overwritting files without asking and failing on directories [\#141](https://github.com/ouch-org/ouch/pull/141) ([SpyrosRoum](https://github.com/SpyrosRoum))
- Fix decompression overwriting files without asking and failing on directories [\#141](https://github.com/ouch-org/ouch/pull/141) ([SpyrosRoum](https://github.com/SpyrosRoum))

### Improvements

@@ -189,7 +210,7 @@ Categories Used:
- Omit "./" at the start of the path [\#109](https://github.com/ouch-org/ouch/pull/109) & [\#116](https://github.com/ouch-org/ouch/pull/116) ([exoego](https://github.com/exoego))
- Introduce new enum for policy on how to handle y/n questions [\#124](https://github.com/ouch-org/ouch/issues/124) ([AntonHermann](https://github.com/AntonHermann))
- Add missing docs [\#128](https://github.com/ouch-org/ouch/pull/128) ([GabrielSimonetto](https://github.com/GabrielSimonetto))
- CI: Check the format with Github Action [\#126](https://github.com/ouch-org/ouch/pull/126) ([dcariotti](https://github.com/dcariotti))
- CI: Check the format with Github Action [\#126](https://github.com/ouch-org/ouch/pull/126) ([boozec](https://github.com/boozec))
- CI: Rewrite [\#135](https://github.com/ouch-org/ouch/pull/135) ([figsoda](https://github.com/figsoda))
- Improving error messages and removing dead error treatment code [\#140](https://github.com/ouch-org/ouch/pull/140) ([marcospb19](https://github.com/marcospb19))

@@ -215,7 +236,7 @@ Categories Used:
### New Contributors

- [@figsoda](https://github.com/figsoda) made their first contribution in #86
- [@dcariotti](https://github.com/dcariotti) made their first contribution in #84
- [@boozec](https://github.com/boozec) made their first contribution in #84
- [@SpyrosRoum](https://github.com/SpyrosRoum) made their first contribution in #97
- [@dnaka91](https://github.com/dnaka91) made their first contribution in #101
- [@exoego](https://github.com/exoego) made their first contribution in #109
@@ -256,7 +277,7 @@ Categories Used:

### Improvements

- Further testing to oof cli [\#38](https://github.com/ouch-org/ouch/pull/38) ([fabricio7p](https://github.com/fabricio7p))
- Further testing to oof cli [\#38](https://github.com/ouch-org/ouch/pull/38) ([demfabris](https://github.com/demfabris))
- Reuse Confirmation struct when checking for overwrite permission [\#42](https://github.com/ouch-org/ouch/pull/42) ([vrmiguel](https://github.com/vrmiguel))

## [0.1.5](https://github.com/ouch-org/ouch/compare/0.1.5-rc...0.1.5) (2021-05-27)
@@ -274,15 +295,15 @@ Categories Used:
### Improvements

- Added compression and decompression tests for each current supported format [\#24](https://github.com/ouch-org/ouch/pull/24) ([marcospb19](https://github.com/marcospb19))
- Add tests to oof [\#27](https://github.com/ouch-org/ouch/pull/27) ([fabricio7p](https://github.com/fabricio7p))
- Add tests to oof [\#27](https://github.com/ouch-org/ouch/pull/27) ([demfabris](https://github.com/demfabris))

### Tweaks

- Switch panics to errors [\#21](https://github.com/ouch-org/ouch/pull/21) ([vrmiguel](https://github.com/vrmiguel))

### New Contributors

- [@fabricio7p](https://github.com/figsoda) made their first contribution in [\#27](https://github.com/ouch-org/ouch/pull/27)
- [@demfabris](https://github.com/demfabris) made their first contribution in [\#27](https://github.com/ouch-org/ouch/pull/27)

## [0.1.5-rc](https://github.com/ouch-org/ouch/compare/0.1.4...0.1.5-rc) (2021-04-07)

Loading