Skip to content

Conversation

@ThomasWaldmann
Copy link
Member

@ThomasWaldmann ThomasWaldmann commented Feb 10, 2026

This allows users to compare file content efficiently without reading the full file data, by exposing a hash of the chunk IDs and the relevant conditions for valid comparisons, like chunker params, chunker seed/key, id key, key type, etc.

This is based on PR #5167 by @hrehfeld, code + discussion, with some changes:

  • the conditions hash now includes more relevant input params
  • returning a single value that is composed of 2 parts
  • tests (including new buzhash64)

Example output (different files in same archive):

1e88bfb02d0a5320-a539587200c33b857f9827d01fcb7dabacf30501c83929e7308668d43f4a6302 file1
1e88bfb02d0a5320-9ed78a4c14d0506d9ae75d914cca90db64655ddea22647dd1c89f19e2fc080ae file2

The fingerprint has 2 parts:

First part: same hash, indicates same chunking / chunk id generation params, meaning that the second part is valid to be compared.

Second part: different hash, because file content is different. same hash here would mean same content.

@codecov
Copy link

codecov bot commented Feb 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 75.93%. Comparing base (37fbe3f) to head (baed0bc).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9292      +/-   ##
==========================================
+ Coverage   75.89%   75.93%   +0.03%     
==========================================
  Files          86       86              
  Lines       14761    14771      +10     
  Branches     2198     2199       +1     
==========================================
+ Hits        11203    11216      +13     
+ Misses       2884     2879       -5     
- Partials      674      676       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This allows users to compare file content efficiently without reading the
full file data, by exposing a hash of the chunk IDs and the relevant
conditions for valid comparisons, like chunker params, chunker seed/key,
id key, key type, etc.

This is based on PR borgbackup#5167 by @hrehfeld, code + discussion, with some changes:
- the conditions hash now includes more relevant input params
- returning a single value that is composed of 2 parts
- tests (including new buzhash64)

Example output (different files in same archive):

1e88bfb02d0a5320-a539587200c33b857f9827d01fcb7dabacf30501c83929e7308668d43f4a6302 file1
1e88bfb02d0a5320-9ed78a4c14d0506d9ae75d914cca90db64655ddea22647dd1c89f19e2fc080ae file2

The fingerprint has 2 parts:

First part: same hash, indicates same chunking / chunk id generation params,
            meaning that the second part is valid to be compared.

Second part: different hash, because file content is different.
             same hash here would mean same content.
@ThomasWaldmann ThomasWaldmann changed the title list --format: added the fingerprint placeholder list --format: add fingerprint placeholder Feb 10, 2026
@ThomasWaldmann ThomasWaldmann force-pushed the list-fingerprint-master branch from babbbdc to baed0bc Compare February 10, 2026 07:50
@ThomasWaldmann ThomasWaldmann merged commit b802cfd into borgbackup:master Feb 11, 2026
18 checks passed
@ThomasWaldmann ThomasWaldmann deleted the list-fingerprint-master branch February 11, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant