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: gblach/reflicate
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.1.0
Choose a base ref
...
head repository: gblach/reflicate
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.2.0
Choose a head ref

Commits on Jan 8, 2023

  1. Remove file keyword

    gblach committed Jan 8, 2023
    Copy the full SHA
    35246f7 View commit details
  2. Add Install section

    gblach authored Jan 8, 2023
    Copy the full SHA
    b638cfe View commit details

Commits on Jan 13, 2023

  1. Copy the full SHA
    507aa0e View commit details
  2. Copy the full SHA
    0ae6ad1 View commit details
  3. Copy the full SHA
    2aed5f7 View commit details
  4. Create rust-clippy.yml

    gblach authored Jan 13, 2023
    Copy the full SHA
    563d51b View commit details
  5. Copy the full SHA
    633b6c3 View commit details
  6. Copy the full SHA
    e0065f2 View commit details

Commits on Jan 14, 2023

  1. Rewrite C code in Rust

    gblach committed Jan 14, 2023
    Copy the full SHA
    3d1596a View commit details
  2. Be a bit more verbose

    gblach committed Jan 14, 2023
    Copy the full SHA
    0321780 View commit details
  3. Copy the full SHA
    65aac35 View commit details
  4. Copy the full SHA
    5ae2274 View commit details
  5. Copy the full SHA
    ef0fc42 View commit details
  6. Remove needless borrows

    gblach committed Jan 14, 2023
    Copy the full SHA
    705c684 View commit details
  7. Rename temporary file name

    gblach committed Jan 14, 2023
    Copy the full SHA
    f00efa5 View commit details
  8. Fix destination file name

    gblach committed Jan 14, 2023
    Copy the full SHA
    36f8d58 View commit details
  9. Copy the full SHA
    9ac8b17 View commit details
  10. Copy the full SHA
    08f27ef View commit details
  11. Copy the full SHA
    e148dc9 View commit details
  12. Copy the full SHA
    1c4fb35 View commit details
  13. Copy the full SHA
    9bf944e View commit details
  14. Do not use redundant closure

    gblach committed Jan 14, 2023
    Copy the full SHA
    92720ac View commit details
  15. Remove needless borrows

    gblach committed Jan 14, 2023
    Copy the full SHA
    9b38049 View commit details
  16. Create dependabot.yml

    gblach authored Jan 14, 2023
    Copy the full SHA
    39e7d9e View commit details
  17. Bump argh from 0.1.9 to 0.1.10

    Bumps [argh](https://github.com/google/argh) from 0.1.9 to 0.1.10.
    - [Release notes](https://github.com/google/argh/releases)
    - [Commits](google/argh@0.1.9...0.1.10)
    
    ---
    updated-dependencies:
    - dependency-name: argh
      dependency-type: direct:production
      update-type: version-update:semver-patch
    ...
    
    Signed-off-by: dependabot[bot] <support@github.com>
    dependabot[bot] authored Jan 14, 2023
    Copy the full SHA
    adf5878 View commit details
  18. Merge pull request #1 from gblach/dependabot/cargo/argh-0.1.10

    Bump argh from 0.1.9 to 0.1.10
    gblach authored Jan 14, 2023
    Copy the full SHA
    fa9f43d View commit details
  19. Add missing semicolon

    gblach committed Jan 14, 2023
    Copy the full SHA
    80f7656 View commit details
  20. Copy the full SHA
    3780bcc View commit details

Commits on Jan 15, 2023

  1. Skip all symlinks

    gblach committed Jan 15, 2023
    Copy the full SHA
    3268aa0 View commit details
  2. Collapse if statements

    gblach committed Jan 15, 2023
    Copy the full SHA
    ba71490 View commit details
  3. Copy the full SHA
    ae936ec View commit details
  4. Do not borrow basedir variable

    gblach committed Jan 15, 2023
    Copy the full SHA
    3b88b6e View commit details
  5. Copy the full SHA
    9140582 View commit details
  6. Copy the full SHA
    f1eff9b View commit details
  7. Copy the full SHA
    b6c3b6d View commit details
  8. Copy the full SHA
    b86eb54 View commit details

Commits on Jan 16, 2023

  1. Add systemd unit files

    gblach committed Jan 16, 2023
    Copy the full SHA
    62fbeac View commit details
  2. Add Systemd section

    gblach authored Jan 16, 2023
    Copy the full SHA
    6e39e6f View commit details
  3. Bump to version 0.2.0

    gblach committed Jan 16, 2023
    Copy the full SHA
    5dca0dd View commit details
Showing with 299 additions and 247 deletions.
  1. +1 −1 .editorconfig
  2. +11 −0 .github/dependabot.yml
  3. +55 −0 .github/workflows/rust-clippy.yml
  4. +23 −14 Cargo.lock
  5. +4 −5 Cargo.toml
  6. +22 −0 README.md
  7. +0 −5 build.rs
  8. +110 −117 src/index.rs
  9. +25 −19 src/main.rs
  10. +0 −54 src/reflink.c
  11. +30 −32 src/utils.rs
  12. +9 −0 systemd/reflicate.service
  13. +9 −0 systemd/reflicate.timer
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
root = true

[*.{rs,c}]
[*.rs]
indent_style = tab
indent_size = 8
end_of_line = lf
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "cargo" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
55 changes: 55 additions & 0 deletions .github/workflows/rust-clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# rust-clippy is a tool that runs a bunch of lints to catch common
# mistakes in your Rust code and help improve your Rust code.
# More details at https://github.com/rust-lang/rust-clippy
# and https://rust-lang.github.io/rust-clippy/

name: rust-clippy analyze

on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '29 5 * * 6'

jobs:
rust-clippy-analyze:
name: Run rust-clippy analyzing
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Rust toolchain
uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af #@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true

- name: Install required cargo
run: cargo install clippy-sarif sarif-fmt

- name: Run rust-clippy
run:
cargo clippy
--all-features
--message-format=json | clippy-sarif | tee rust-clippy-results.sarif | sarif-fmt
continue-on-error: true

- name: Upload analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: rust-clippy-results.sarif
wait-for-processing: true
37 changes: 23 additions & 14 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 4 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
[package]
name = "reflicate"
version = "0.1.0"
version = "0.2.0"
edition = "2021"
description = "Deduplicate data by creating reflinks between identical files"
readme = "README.md"
license = "MIT"
repository = "https://github.com/gblach/reflicate"
keywords = ["cli", "deduplication", "file", "filesystem", "reflink", "utility"]
keywords = ["cli", "deduplication", "filesystem", "reflink", "utility"]
categories = ["command-line-utilities", "filesystem"]

[dependencies]
argh = "0.1"
blake3 = "1.3"
cdb = "0.6"
fiemap = "0.1"
getrandom = "0.2"
libc = "0.2"
rmp-serde = "1.1"
serde = { version = "1.0", features = ["derive"] }

[build-dependencies]
cc = "1.0"
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,13 @@

Deduplicate data by creating reflinks between identical files.

## Install

```
$ cargo install reflicate
$ export PATH=$PATH:~/.cargo/bin
```

## Disclaimer

This is an alpha quality software.
@@ -52,6 +59,21 @@ By default **reflicate** uses 256-bit blake3 hashes, which means `11579208923731

Additionally, in paranoic mode all hashes are always computed because it is possible to manipulate file modification time.

## Systemd

Systemd timer can be used to run periodically.
To do this, you need to run the following commands:

```
$ mkdir -p ~/.config/systemd/user/
$ cp systemd/* ~/.config/systemd/user/
$ systemctl --user daemon-reload
$ systemctl --user enable reflicate.timer
```

By default, the periodic task runs weekly and **reflicate** your home directory.
You can adjust this to your needs by editing the `reflicate.service` and `reflicate.timer` files.

## Showcase

At the beginning let's create an XFS file system, mount it, and create a test directory.
5 changes: 0 additions & 5 deletions build.rs

This file was deleted.

Loading