Commit Graph
274 Commits
Author SHA1 Message Date
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
Fintan Halpenny 15014923c7 publish: git-ref-format-{core, macro}, radicle-git-ext, radicle-surf
In an attempt to publish radicle-surf, it could not compile due to
git-ref-format supposedly missing.

This is an attempt to publish the git-ref-format family and
radicle-git-ext again in order to try publish radicle-surf.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-03 20:45:06 +01:00
Fintan Halpenny c0a1bbe8a7 Merge branch 'improve-line'
* improve-line:
  publish: radicle-git-ext and radicle-surf
  surf: improve Line API

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-05-03 20:07:53 +01:00
Fintan Halpenny 9d44dacdae publish: radicle-git-ext and radicle-surf
Publish new versions:
* radicle-git-ext 0.4.0
* radicle-surf 0.10.0

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-03 20:06:40 +01:00
Fintan Halpenny 1ca3ed700d surf: improve Line API
Adds several methods to Line:
* as_bytes -- gets the underlying bytes
* from_utf8 -- convert the Line to a String
* from_utf8_lossy -- convert Line to Cow<str>

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-05-03 16:09:49 +01:00
Fintan Halpenny a8ce42766f meta: update to git2-0.17.0
Updates all crates to the latest git2 version, 0.17.0.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-04-14 17:07:35 +01:00
Fintan Halpenny 6de53f72d4 Merge remote-tracking branch 'origin/workspace-management'
* origin/workspace-management:
  Archive crates
  git-ext: update to version 0.3.0

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-03-28 10:05:04 +01:00
Fintan Halpenny 1668d9fab3 Archive crates
Move git-commit, git-trailers, and link-git to an archived directory
to hide them away -- showing the intent that radicle-git-ext will be
the main crate for git functionality.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-27 11:01:21 +01:00
Fintan Halpenny e81ea9b558 git-ext: update to version 0.3.0
Update radicle-git-ext to version 0.3.0 for publishing to crates.io.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-27 11:01:21 +01:00
Fintan Halpenny 165f25f03d Merge remote-tracking branch 'origin/verify-commit-data'
* origin/verify-commit-data:
  git-ext: check commit's metadata fields
  meta: update to tempfile 3.4

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-03-09 17:45:15 +00:00
Fintan Halpenny 5c1ae05420 git-ext: check commit's metadata fields
The `Oid`s passed into `Commit::new` for parents and tree are never
verified to be commits or a tree, respectively.

Upon `write` of the commit, read the object using the ODB to determine
its type. If its the incorrect object then function fails without
writing to the ODB.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-09 12:50:39 +00:00
Fintan Halpenny a0eae0e8eb meta: update to tempfile 3.4
A vulnerability in a transitive dependency, remove_dir_all, used by
tempfile was found[0].

Update tempfile to 3.4, which does not depend on remove_dir_all.

[0]: https://rustsec.org/advisories/RUSTSEC-2023-0018

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-03-09 12:38:38 +00:00
Fintan Halpenny a887e542f6 Merge remote-tracking branch 'origin/merge-git-ref-format'
* origin/merge-git-ref-format:
  move git-ref-format to under radicle-git-ext

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-03-01 17:35:29 +00:00
Han Xu 59515f68e8 move git-ref-format to under radicle-git-ext
Signed-off-by: Han Xu <keepsimple@gmail.com>
2023-02-21 20:19:30 -08:00
Fintan Halpenny f06bc38c26 Merge remote-tracking branch 'origin/mergers'
* origin/mergers:
  radicle-git-ext: merge in git-commit

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-02-21 10:08:06 +00:00
Han Xu c844605121 radicle-git-ext: merge in git-commit
Removed `mod references` and its uses in `radicle-macros` and
`radicle-git-types` crates.

Signed-off-by: Han Xu <keepsimple@gmail.com>
2023-02-19 18:43:55 -08:00
Fintan Halpenny a3a63e4d45 Merge remote-tracking branch 'origin/git2-trailers'
* origin/git2-trailers:
  git-commit: remove dependency on git-trailers

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-02-16 17:05:49 +00:00
Fintan Halpenny ab05b63614 git-commit: remove dependency on git-trailers
The git-trailers crate depends on parsing logic using nom. This is a
heavy dependency for something that can be done using git2.

Remove the dependency of git-trailers in git-commit and localise the
trailer types -- using git2 to parse the trailers out of the git
commit message.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
X-Clacks-Overhead: GNU Terry Pratchett
2023-02-14 15:34:32 +00:00
Fintan Halpenny 2456fcdb04 Merge remote-tracking branch 'origin/newlines'
* origin/newlines:
  git-commit: remove useless check when converting trailers to string.

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-02-10 13:26:29 +00:00
Fintan Halpenny 4457f12428 Merge remote-tracking branch 'origin/update-doc'
* origin/update-doc:
  update docs and add test for commit signature

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-02-09 09:48:52 +00:00
Fintan Halpenny 18c4f53421 Merge remote-tracking branch 'origin/radicle-git-ext-bump-version'
* origin/radicle-git-ext-bump-version:
  bump up version for radicle-git-ext

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-02-08 16:27:57 +00:00
Fintan Halpenny e0358441b9 Merge remote-tracking branch 'origin/git-ref-format-bump-version'
* origin/git-ref-format-bump-version:
  git-ref-format: bump up version and add CHANGELOG.md

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-02-08 16:26:33 +00:00
Fintan Halpenny f40d5fba06 Merge remote-tracking branch 'origin/changelog'
* origin/changelog:
  add CHANGELOG.md

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-02-08 16:20:14 +00:00
Fintan Halpenny 5fdccdc8f0 Merge remote-tracking branch 'origin/diff-eof'
* origin/diff-eof:
  radicle-surf: Update disabled eof tests to use new methods
  radicle-surf: fix EofNewLine

Signed-off-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2023-02-08 16:19:34 +00:00
xphoniex bf31d6f636 radicle-surf: Update disabled eof tests to use new methods
Signed-off-by: xphoniex <xphoniex@users.noreply.github.com>
2023-02-08 15:10:10 +00:00
Han Xu 7f80ab117d git-commit: remove useless check when converting trailers to string.
Signed-off-by: Han Xu <keepsimple@gmail.com>
2023-02-08 00:26:46 -08:00
Han Xu ac9cfc1cc6 git-ref-format: bump up version and add CHANGELOG.md
Signed-off-by: Han Xu <keepsimple@gmail.com>
2023-02-07 04:11:16 -08:00