github Byron/gitoxide git-discover-v0.9.0
git-discover v0.9.0

22 months ago

Bug Fixes

  • Discover repo with relative path and ceiling
    A couple of problems are repaired to allow discovering a repository from
    "." with a ceiling directory.

    One problem was that find_ceiling_height() did the wrong thing when
    confronted with any relative search_dir. This is resolved by converting
    search_dir to be absolute if it is relative.

    The other problem was that discover_opts() also mishandled relative paths.
    When the cursor started out as ".", cursor.pop() would be blindly called
    such that cursor would be "" for the second iteration. When a ceiling
    directory was in use such that there was a max_height, the current height
    would be burned going from ".", to "", and then to "", before finally
    actually getting to a real parent directory. This problem is ameliorated by
    testing whether the cursor has a non-empty parent before popping.

    N.B. the new test case relies on the test running from the git-discover
    directory such that the gitoxide repository will be found. This is a bit
    fragile and will fail if, for example, the test is run from an unpacked
    gitoxide source tarball.

New Features (BREAKING)

  • Path::from_dot_git_dir() now takes the current_dir as argument and returns Option<path>
    That way it's possible to avoid at least one call of
    std::env::current_dir() per invocation, which also is more consnstent
    with similar plumbing methods.

    Furthermore it can signal with None if the input directory was invalid.

  • upgrade edition to 2021 in most crates.
    MSRV for this is 1.56, and we are now at 1.60 so should be compatible.
    This isn't more than a patch release as it should break nobody
    who is adhering to the MSRV, but let's be careful and mark it
    breaking.

    Note that git-features and git-pack are still on edition 2018
    as they make use of a workaround to support (safe) mutable access
    to non-overlapping entries in a slice which doesn't work anymore
    in edition 2021.

Commit Statistics

  • 9 commits contributed to the release over the course of 2 calendar days.
  • 4 days passed between releases.
  • 3 commits were understood as conventional.
  • 0 issues like '(#ID)' were seen in commit messages

Commit Details

view details
  • Uncategorized
    • prepare changelogs prior to release (e4648f8)
    • Merge branch 'discover-rel-path' (5f908fb)
    • add test that actually uses chdir like in the real world. (048c8b2)
    • refactor (cdb9556)
    • Discover repo with relative path and ceiling (6fc5c06)
    • Merge branch 'cwd-consistency' (ea7c6a3)
    • Path::from_dot_git_dir() now takes the current_dir as argument and returns Option<path> (b4dcfc7)
    • Merge branch 'version2021' (0e4462d)
    • upgrade edition to 2021 in most crates. (3d8fa8f)

Don't miss a new gitoxide release

NewReleases is sending notifications on new releases.