We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when Git has a version prior to 2.43.0, --bare and --origin are incompatible options of ^git clone, thus gm clone --bare will fail with
--bare
--origin
^git clone
gm clone --bare
fatal: --bare and --origin foo options are incompatible.
tk run { gm clone https://github.com/raphamorim/rio --bare }
will fail on Ubuntu for instance.
either
> git --version git version 2.34.1
See commit 3b910d6 (22 Sep 2022) by Jeff King (peff). (Merged by Junio C Hamano (gitster) in commit 7aeb0d4, 10 Oct 2022)
The text was updated successfully, but these errors were encountered:
a way to compare semantic versions
export def "semver parse" []: string -> record<major: int, minor: int, patch: int> { parse "{major}.{minor}.{patch}" | into value | into record } # Example # check the version of Git (see [*Why are git clone --bare and --origin incompatible?*](https://stackoverflow.com/questions/19434441/why-are-git-clone-bare-and-origin-incompatible)) # > let git_version = ( # git --version | str trim | parse "git version {version}" | into record | get version # ) # $git_version | semver parse | semver after ("2.39.0" | semver parse) export def "semver after" [ other: record<major: int, minor: int, patch: int> ]: record<major: int, minor: int, patch: int> -> bool { let version = $in if $version.major < $other.major { return false } if $version.minor < $other.minor { return false } if $version.patch < $other.patch { return false } true } # Example # check the version of Git (see [*Why are git clone --bare and --origin incompatible?*](https://stackoverflow.com/questions/19434441/why-are-git-clone-bare-and-origin-incompatible)) # > let git_version = ( # git --version | str trim | parse "git version {version}" | into record | get version # ) # $git_version | semver parse | semver before ("2.39.0" | semver parse) export def "semver before" [ other: record<major: int, minor: int, patch: int> ]: record<major: int, minor: int, patch: int> -> bool { not ($in | semver after $other) }
Sorry, something went wrong.
No branches or pull requests
Describe the bug
when Git has a version prior to 2.43.0,
--bare
and--origin
are incompatible options of^git clone
, thusgm clone --bare
will fail withHow to reproduce
will fail on Ubuntu for instance.
Expected behavior
either
Configuration
> git --version git version 2.34.1
Additional context
The text was updated successfully, but these errors were encountered: