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
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
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
* 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>
* 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>
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>
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
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
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.
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
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`.
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>
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
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
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
* 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>
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>
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
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
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
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
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