Commit Graph
300 Commits
Author SHA1 Message Date
Fintan Halpenny d5bf8e7f68 nix: update to rust-1.76
Run `niv update` to get the latest Rust toolchain.

This required applying some clippy improvements:

- Removing unnecessary re-export of Oid in `stats` module.
- Replace `get(0)` with `first`

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2024-03-05 09:59:12 +00:00
Fintan Halpenny e0b8789b47 git-ext, surf: update git2-0.18.1
Update git2 version to 0.18.1 and provide an updated release version
of radicle-git-ext 0.7.0 and radicle-surf 0.18.0.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-12-04 10:57:39 +00:00
Fintan Halpenny da05e409da surf: release 0.17.1
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-11-23 09:17:12 +00:00
Fintan Halpenny 71392e70a9 Merge remote-tracking branch 'origin/blob_ref'
* origin/blob_ref:
  surf: expose BlobRef

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-11-23 09:13:36 +00:00
Fintan Halpenny d3dd777d95 surf: expose BlobRef
The current `blob` function is limited to always associating a Blob
with a Commit.

Expose `BlobRef` through a `blob_ref` method, and add useful methods
and serialization to it.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-11-22 14:53:09 +00:00
Fintan Halpenny ab791d5f2c nix: update rust-1.74.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-11-22 14:11:52 +00:00
Fintan Halpenny f83c6d6856 surf: release v0.17.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-10-02 10:38:58 +01:00
Fintan Halpenny e7e059e233 Merge remote-tracking branch 'sebastinez/add-line-stats-per-file'
* sebastinez/add-line-stats-per-file:
  surf: Add `stats` property to each `DiffContent::Plain`

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-10-02 10:35:01 +01:00
Sebastian Martinez 097d01350d surf: Add stats property to each DiffContent::Plain
This allows us to get the additions and deletions for each file in a
diff.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-10-02 11:29:22 +02:00
Fintan Halpenny 3c8e3cd9d8 Merge remote-tracking branch 'sebastinez/add-small-disclaimer-on-diff-commits-fn'
* sebastinez/add-small-disclaimer-on-diff-commits-fn:
  surf: Add a small explainer on binary detection in diffs

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-10-02 10:19:16 +01:00
Sebastian Martinez c4590eca2d surf: Add a small explainer on binary detection in diffs
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-09-25 11:36:46 +02:00
Fintan Halpenny 25b6fcea2f surf: release v0.16.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-09-25 09:57:00 +01:00
Fintan Halpenny 80ac22a7e2 Merge remote-tracking branch 'sebastinez/add-current-oid-to-filediff'
* sebastinez/add-current-oid-to-filediff:
  surf: Add `DiffFile`s to `FileDiff` variants without a diff

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-09-21 15:07:56 +01:00
Sebastian Martinez 958216084e surf: Add DiffFiles to FileDiff variants without a diff
This allows us to know the blob oid of a moved or copied file, even when
no diff is available.

Also changes the structure of a copied file to be the same as a moved or
renamed file.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-09-21 15:48:56 +02:00
Fintan Halpenny 1872717660 surf: publish v0.15.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-09-01 08:57:06 +01:00
Fintan Halpenny 31c6d7c28f Merge remote-tracking branch 'origin/surf/improve-moved-diff'
* origin/surf/improve-moved-diff:
  surf: improve Moved type for Diff's

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-09-01 08:53:25 +01:00
Fintan Halpenny 6ee2815cbf surf: improve Moved type for Diff's
In some cases a moved file can also be modified and in these cases
there will be a diff as well as new Oid's for the two sides of the
diff.

Add DiffFile to the Moved type, changing the insert_moved method to
accept the DiffFile's and the DiffContent.

When serializing a Moved, if the old and the new are the same then the
serialization of the diff files and content are skipped -- same as the
old behaviour. Otherwise, the two sides are serialized along with the
content.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-08-30 17:10:25 +01:00
Fintan Halpenny bc06ee0773 nix: update to rust-1.72.0
Update the toolchain to rust-1.72.0. This brought with it a new clippy
check for needless '#'s for string literals. However, this is a false
positive and is being tracked here[[0]].

[0]: https://github.com/rust-lang/rust-clippy/issues/11402

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-08-30 16:16:29 +01:00
Fintan Halpenny 60e919a2bf Merge remote-tracking branch 'diff-pub'
* diff-pub:
  surf: Open Diff to custom construction

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-08-25 08:40:20 +01:00
Slack Coder e7b5f9a90b surf: Open Diff to custom construction
Put the Diff type in lines with its associated types by opening it up to
construction by crate consumers.  The existing associated types have all
their fields public.

Open construction up by making the `Diff::insert_*` methods public and
updating the Diff's stats manually.  `Diff::stat` correctness is covered
by existing tests.
2023-08-24 09:37:29 -05:00
Fintan Halpenny 982f71638b surf: release v0.14.1
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-08-16 10:09:39 +01:00
Fintan Halpenny a3d2cc80e0 nix: update toolchain to rust-1.71.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-08-10 09:53:02 +01:00
Fintan Halpenny 3ad3a85b63 Merge remote-tracking branch 'slack-coder/typo'
* slack-coder/typo:
  Fix Modification doc typo

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-08-01 16:00:28 +01:00
Slack Coder 435b422b9d Fix Modification doc typo
"A lines is" -> "A line is".
2023-08-01 08:56:51 -05:00
Fintan Halpenny faec1844b5 surf: update Cargo metadata
The homepage and repository fields were out of date. Update them to
the new radicle-git link.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-07-27 16:44:15 +01:00
Fintan Halpenny b1984bd3f8 Merge remote-tracking branch 'seb/sebastinez/fileDiff-path'
* seb/sebastinez/fileDiff-path:
  surf: Add `FileDiff::path` method

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-07-24 18:16:09 +01:00
Sebastian Martinez 43c3564187 surf: Add FileDiff::path method
This allows to get the latest path of a `FileDiff`, directly from
`radicle_surf`

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-07-24 17:42:51 +02:00
Sebastian Martinez f9360d83e7 git-storage: fix formatting issue
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-28 13:50:59 +01:00
Sebastian Martinez b3c4ae3e3d data/git-platinum: add a file copy operation
To test a copy operation of a file modified in the same changeset, we
need to create a copy of the file in the same changeset.

We copy the modified README.md to a new folder called `file_operations`.
2023-06-28 11:36:22 +02:00
Sebastian Martinez 48c508064c surf: make update-script-platinum script work on macOS
Without the `-r` flag the read command isn't able to extract the values
correctly from the comma separated lines on macOS.

Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-28 11:34:06 +02:00
Sebastian Martinez b8def65d6e surf: add simple copy detection to diff
Signed-off-by: Sebastian Martinez <me@sebastinez.dev>
2023-06-28 11:31:21 +02:00
Fintan Halpenny e6a20735c6 surf: release v0.14.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-06-22 12:49:54 +01:00
Fintan Halpenny 2a555e726a Merge remote-tracking branch 'origin/cloudhead/hunk-ranges'
* origin/cloudhead/hunk-ranges:
  surf: Add hunk lines ranges

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-06-22 12:46:06 +01:00
Alexis Sellier c47863be76 surf: Add hunk lines ranges 2023-06-22 12:44:30 +02:00
Fintan Halpenny 045a2d6534 publish: radicle-git-ext, git-ref-format-*, radicle-surf
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-06-02 13:40:33 +01:00
Fintan Halpenny 9bc0d118a0 publish: radicle-git-ext-0.5.1, radicle-surf-0.12.1
Add features to radicle-git-ext to access the bstr and
percent-encoding features of git-ref-format.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-31 13:57:36 +01:00
Fintan Halpenny 2545a01fec surf: release v0.12.0
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-26 20:45:51 +01:00
Fintan Halpenny 6348e48e1f Merge remote-tracking branch 'origin/cloudhead/add-file-info-to-diff'
* origin/cloudhead/add-file-info-to-diff:
  Add file information to diff

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-05-26 08:58:45 +01:00
Alexis Sellier 248e23e6cf Add file information to diff
Adds file mode and file OIDs to the file diff.
2023-05-24 17:41:45 +02:00
Fintan Halpenny 5513ba4f41 publish: radicle-surf 0.11.0
Publish radicle-surf, updating radicle-git-ext and allowing a minicbor
feature flag.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-10 10:37:13 +01:00
Fintan Halpenny 6309dea70d publish: radicle-git-ext 0.5.0
Publish radicle-git-ext to include the following changes:
* Hiding minicbor behind a feature flag
* Fix to commit author's time display/parse

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-10 08:59:30 +01:00
Fintan Halpenny 8d4d3faeeb Merge remote-tracking branch 'origin/dave/fix-author-timestamp'
* origin/dave/fix-author-timestamp:
  git-ext: Display/parse timezone offset in the format git2 expects.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-05-10 08:57:41 +01:00
xphoniex 98a6e69379 git-ext: Display/parse timezone offset in the format git2 expects.
The previous implementation of Display for Time is shown as absolute
minutes, whereas git expects HH:MM format.

The FromStr implementation for Author also did not correctly convert
+/-HHMM to absolute minutes.

Signed-off-by: xphoniex <xphoniex@users.noreply.github.com>
Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-05-09 22:27:25 +01:00
Fintan Halpenny 0897f918e6 radicle-git-ext: feature flag minicbor
Hide the minicbor feature of git-ref-format behind a minicbor feature
flag in radicle-git-ext.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-08 12:47:51 +01:00
Fintan Halpenny 4c9e958dd7 publish: radicle-git-ext, git-ref-format, radicle-surf
git-ref-format-core included the required changes and was missed via
the last publish. Publish the set of crates bumped up to a new semver.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-05 10:37:50 +01:00
Fintan Halpenny 30693264da Merge
* radicle-git improvements:
  publish: git-ref-format, radicle-git-ext, radicle-surf
  git-ref-format: add Refspec type
  commit: use read_header
  trailers: add Token constructor

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-05-05 10:12:19 +01:00
Fintan Halpenny fc6a4fcac5 publish: git-ref-format, radicle-git-ext, radicle-surf
Publish git-ref-format, radicle-git-ext, and radicle-surf with several
additions and bug fixes.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-05 10:11:13 +01:00
Fintan Halpenny 64fef2f0ad git-ref-format: add Refspec type
Add a Refspec type that represents a `[+]<src>:<dst>` refspec[[0]].

[0]: https://git-scm.com/book/en/v2/Git-Internals-The-Refspec

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-05 09:50:53 +01:00
Fintan Halpenny 24e27f6e87 commit: use read_header
The `Odb::reader` method states:

    Note that most backends do not support streaming reads because
    they store their objects as compressed/delta’ed blobs. If the
    backend does not support streaming reads, use the read method
    instead.

This can lead to objects not being found when verifying for
commits. Instead use `read_header` to determine the `ObjectType` of
the `Oid`.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-04 17:27:47 +01:00
Fintan Halpenny 956bf070d4 trailers: add Token constructor
During the reorganisation of the codebase, the constructors for Token
were removed.

Add back a constructor via the `TryFrom<&'a str>` trait.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-04 11:54:21 +01:00