github GitoxideLabs/gitoxide git-repository-v0.21.0
git-repository v0.21.0

2 years ago

Changed

  • Invert behaviour to open::Options::strict_config(), with lenient being the default.
    This means API users will get libgit2 behaviour but commands like gix can
    change options to emulate git behaviour.

New Features

  • Kind can now represent submodules.
    This should complete the list of git repository types and flavors.
  • open() and discover() support opening submodules.
    This includes submodule checkouts as well as their original module git
    directories.
  • open::Options::lenient_config(…) to default otherwise invalid configuration values where possible
    Originally required by starship/starship#4266 .
  • support core.worktree option
  • display for object::tree::EntryRef
  • Head::prior_checked_out_branches()
  • Repository::index() and Worktree::index().
    These methods provide a possibly updated shared index.
  • add Repository::object_cache_size_if_unset()
  • Commit::message_raw_sloppy() to provide yet another way to obtain a commit message.
  • add rev_spec::parse::ObjectKindHint to support core.disambiguate.
    The latter is seemingly undocumented in the typical place, git-config.

Bug Fixes

  • assure permissions per trust level are properly inherited into open::Options.
  • provide additional explanation about when to use open::Options::with()

Refactor

  • embrace revision module and move rev_walk there.
    Let's embrace the idea of structured modules and platforms in the right
    spot in the module hierarchy instead of forcing known names on it that
    over-simplify.

Changed (BREAKING)

  • remove permissions::Config::strict() as they were unused internally.
    Furthermore, they were allowing everything as before so better not to
    have it.

  • rename Repository::load_mailmap* to Repository::open_mailmap*.
    For consistency with other similar methods.

  • remove Repository::load_index() in favor of repo.worktree().open_index().

  • git_revision is now available in revision::plumbing.
    That way it won't clash with the higher-level constructs on top of it
    which use the same names.

  • Turn id::Ancestors into general-purpose RevWalk.

  • remove Permissions::git_dir field entirely.
    It was meant to help dealing with bailing out if the git dir isn't
    fully trusted, but the way this was done was over-engineered especially
    since the read-only permission level wasn't implemented at all.

    That function is now performed by a new flag, the bail_on_untrusted
    which is off by default.

New Features (BREAKING)

  • Repository::rev_parse() returns a RevSpec.
    This lays the foundation for actually handling rev-specs faithfully.
    Previous users should use rev_parse().single() to obtain a single
    object id which was the only supported usecase previously.

Bug Fixes (BREAKING)

  • Don't panic for @{1} in new repos; rename Head::into_referent() to ::try_into_referent()
    The signature change will prevent such issues in the future as one
    cannot simply ignore new repositories.

Commit Statistics

  • 133 commits contributed to the release over the course of 26 calendar days.
  • 26 days passed between releases.
  • 22 commits where understood as conventional.
  • 2 unique issues were worked on: #427, #482

Thanks Clippy

Clippy helped 6 times to make code idiomatic.

Commit Details

view details
  • #427
    • display for object::tree::EntryRef (b47bbb7)
    • make fmt (4b320e7)
    • Head::prior_checked_out_branches() (727768a)
    • improve docs (1e47bc1)
    • refactor (e67deab)
    • implement @^{} syntax (fbd5aab)
    • access to reflog entries (5cd06cf)
    • declare reflog access by date to be planned. (95bcf3b)
    • officially make sibling branches 'planned' (145631b)
    • implement nth prior checkout (ff37fae)
    • test for nth prior checkout (4fd2314)
    • refactor, add complex test for traversal (4f83470)
    • support for ancestor traversal (ac2105f)
    • refactor (6ffbf4c)
    • support for parent traversal (aa80030)
    • Index lookup works and provides hints en-par with git in terms of information at least. (a049bd3)
    • failing tests for index rev-parsing (502d8c9)
    • Make git-index non-optional and part of the standard setup. (c2e84a4)
    • Repository::index() and Worktree::index(). (ffe7291)
    • rename Repository::load_mailmap* to Repository::open_mailmap*. (1c12d49)
    • remove Repository::load_index() in favor of repo.worktree().open_index(). (ea35183)
    • tests for reference name retrieval. (7a8c8f3)
    • add Repository::object_cache_size_if_unset() (47619f7)
    • Use Display for revision printing instead of Debug (d194f15)
    • adapt to changes in git-revision (65b337d)
    • Assure only commits serve as starting point (5ad0f96)
    • test regex negation, which brought up a traversal ordering bug (7b1733e)
    • multi-tip regex work (4ca4919)
    • A way to obtain a rev-walk platform directly from the top-level repo. (835dcf4)
    • Only run regex based searches if a substring search won't do (295bf9f)
    • fix docs (25fd8fe)
    • a first failing test for regex-search. (13e0938)
    • make clear in error text if regex aren't actually used. (cfb8c40)
    • Move RevSpec to revision::Spec. (1b8df18)
    • refactor (e05aa3b)
    • align tests to upcoming structure of RevSpec (41d6dd2)
    • git_revision is now available in revision::plumbing. (4fd0968)
    • embrace revision module and move rev_walk there. (b38a212)
    • Turn id::Ancestors into general-purpose RevWalk. (2424957)
    • git sorts commit traversals and so do we (538ecd4)
    • Use prefix consisently when reporting object ids (bf9e27b)
    • Commit::message_raw_sloppy() to provide yet another way to obtain a commit message. (d2611ce)
    • support for regex-based matching for single-tips (6369153)
    • assure regex search failure is registered as such (b58d7cb)
    • non-regex implementation of single-tip search for commit messages (7ad4e54)
    • Provide an error if regex is not compiled in but is used (838a6ba)
    • frame for optional regex support in git-repository (7f43d95)
    • Add complex repositry example similar to the one by Jon Loeliger (1e0b431)
    • assure all forms of ranges/merge-bases disambiguate equally (4fdc120)
    • fix tests that was flaky due to time-dependent comparison. (9fa9850)
    • follow refs as well when resolving names to ids. (34c8140)
    • Correctly disambiguate objects in ranges without falling back to repo-disambiguation configuration (17a1edf)
    • Disambiguation of ranges by committish works (8b0ceb5)
    • first failing test to check for range disambiguation (a5eb4fb)
    • better error messages in case all ambiguous objects fail a transformation (97922f8)
    • Make use of git-revision::Spec in RevSpec data structure. (004915e)
    • sketch the new version of the RevSpec data structure (98d32c6)
    • sketch data structure for actually using baseline range results (f6da78f)
    • basic parsing of range baseline (b6013b6)
    • adjust to change in git-revision (51762bb)
    • adjust to changes in git-revision (df7da1f)
    • fix docs (5425de9)
    • Adjust RevSpec::range() to match changes in git-revision (05ea453)
    • adjust to changes in git-revision (a70f262)
    • All disambiguation tests work as good as git or better. (c397761)
    • re-enable more tests (04e1558)
    • more tests, still in progress (8d92eb6)
    • improve error messages related to peeling (b61a343)
    • gix rev parse now uses Repository::rev_parse() (e191681)
    • also maintain git-style sort order of objects (c14754a)
    • git-style disambiguation errors (5717194)
    • refactor (6f7823f)
    • refactor; prepare for detailed ambiguous object information (0a08583)
    • refactor (017727a)
    • refactor (87e7d97)
    • refactor (1d2ef52)
    • a way to not degenerate information when chaining errors (8d723ad)
    • compare all configurable disambiguation types against baseline (c98195b)
    • refactor (929308d)
    • more impelmentation of object disambiguation (9127d15)
    • first repository-local disambiguation works (31db570)
    • a general setup to peel objects while managing candidates. (c418527)
    • set foundation for core.disambiguate implementation (96cb5ee)
    • parse core.disambiguate from configuration and cache it. (335c459)
    • add rev_spec::parse::ObjectKindHint to support core.disambiguate. (906c958)
    • Repository::rev_parse() returns a RevSpec. (e2aff28)
    • improve error message for Fail mode with ref matching as well as object(s) (1ef7281)
    • add support for keeping multiple candidates in case of ambiguous objects. (8b4e5e0)
    • refactor (2b2cb6d)
  • #482
    • Bring back conversion from discovery kind to git-repository::Kind (ebb5bee)
    • Kind can now represent submodules. (a01525d)
    • open() and discover() support opening submodules. (5dac021)
    • Add archive for submodule test (7ab3279)
    • test showing that submodules dirs can't be opened right now (5a9c537)
  • Uncategorized
    • Release git-date v0.0.3, git-actor v0.11.1, git-attributes v0.3.1, git-tempfile v2.0.3, git-object v0.20.1, git-ref v0.15.1, git-config v0.6.1, git-diff v0.17.1, git-discover v0.4.0, git-bitmap v0.1.1, git-index v0.4.1, git-mailmap v0.3.1, git-traverse v0.16.1, git-pack v0.21.1, git-odb v0.31.1, git-packetline v0.12.6, git-url v0.7.1, git-transport v0.19.1, git-protocol v0.18.1, git-revision v0.4.0, git-worktree v0.4.1, git-repository v0.21.0, safety bump 5 crates (c96473d)
    • prepare changelogs prior to reelase (c06ae1c)
    • Invert behaviour to open::Options::strict_config(), with lenient being the default. (0235111)
    • open::Options::lenient_config(…) to default otherwise invalid configuration values where possible (067c334)
    • Release git-hash v0.9.7, git-features v0.22.1 (232784a)
    • Merge branch 'index-write-refactor' (805f432)
    • first PoC for writing long paths, even though it doens't produce the entire file yet (581cbd7)
    • adjust git_date::parsea(str) to use a str (0f8680a)
    • Merge branch 'format_git_date_time' (99e12be)
    • refactor (bd64387)
    • thanks clippy (4bd747c)
    • Don't panic for @{1} in new repos; rename Head::into_referent() to ::try_into_referent() (c68b125)
    • Merge branch 'feat-core-worktree' (df42d22)
    • remove permissions::Config::strict() as they were unused internally. (0deda0d)
    • test absolute worktree dirs as well when overridden in core.worktree (4e17864)
    • validate core.worktree handling in bare repositories (cba6983)
    • Add more tests around invalid core.worktree values (1591a50)
    • move tests into worktree module and prepare for more of them (a05b15b)
    • Use time format strings. (f84e8f5)
    • support core.worktree option (0bf8371)
    • refactor (556dd8c)
    • Format git-date::Time with time::format_description. (d4243bc)
    • Merge branch 'parse-refspec' (2ba338e)
    • support for @: == @^{tree} in rev-parsing (6c06406)
    • Merge branch 'write-index-files' into write-index-v2 (cddc2ca)
    • thanks clippy (90dccc3)
    • thanks clippy (df83e23)
    • Merge branch 'write-index-files' into rev-parse-delegate (370110d)
    • thanks clippy (6163caa)
    • Merge branch 'main' into rev-parse-delegate (4ae2bed)
    • thanks clippy (d8511bb)
    • thanks clippy (a479bd3)
    • Merge branch 'main' into rev-parse-delegate (6da8250)
    • remove Permissions::git_dir field entirely. (1df379a)
    • assure permissions per trust level are properly inherited into open::Options. (be6114e)
    • provide additional explanation about when to use open::Options::with() (270242c)
    • make fmt (47724c0)
    • Merge branch 'kianmeng-fix-typos' (4e7b343)
    • Fix typos (e9fcb70)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.