-
-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into filter-refs-by-spec
- Loading branch information
Showing
24 changed files
with
396 additions
and
257 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "cargo-smart-release" | ||
version = "0.12.0" | ||
version = "0.12.1" | ||
authors = ["Sebastian Thiel <[email protected]>"] | ||
repository = "https://github.com/Byron/gitoxide" | ||
description = "Cargo subcommand for fearlessly releasing crates in workspaces." | ||
|
@@ -32,7 +32,7 @@ cargo_metadata = "0.14.0" | |
log = "0.4.14" | ||
toml_edit = "0.14.0" | ||
semver = "1.0.4" | ||
crates-index = "0.18.1" | ||
crates-index = "0.18.9" | ||
cargo_toml = "0.11.4" | ||
nom = { version = "7", default-features = false, features = ["std"]} | ||
git-conventional = "0.11.1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
mod repository_url { | ||
use crate::changelog::write::RepositoryUrl; | ||
use git_repository as git; | ||
|
||
#[test] | ||
fn github_https_url() { | ||
for input in [ | ||
"https://github.com/byron/gitoxide", | ||
"https://github.com/byron/gitoxide.git", | ||
"git://github.com/byron/gitoxide", | ||
"git://github.com/byron/gitoxide.git", | ||
"[email protected]:byron/gitoxide.git", | ||
"[email protected]:byron/gitoxide", | ||
] { | ||
let url = RepositoryUrl::from(git::url::parse(input.into()).unwrap()); | ||
assert_eq!( | ||
url.github_https().expect("possible"), | ||
"https://github.com/byron/gitoxide" | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use anyhow::{bail, Context}; | ||
use git_repository as git; | ||
use git_repository::prelude::ObjectIdExt; | ||
use std::ffi::OsString; | ||
|
||
use crate::OutputFormat; | ||
|
||
pub fn list( | ||
mut repo: git::Repository, | ||
spec: OsString, | ||
mut out: impl std::io::Write, | ||
format: OutputFormat, | ||
) -> anyhow::Result<()> { | ||
if format != OutputFormat::Human { | ||
bail!("Only human output is currently supported"); | ||
} | ||
repo.object_cache_size_if_unset(4 * 1024 * 1024); | ||
|
||
let spec = git::path::os_str_into_bstr(&spec)?; | ||
let id = repo | ||
.rev_parse(spec)? | ||
.single() | ||
.context("Only single revisions are currently supported")?; | ||
let commit_id = id | ||
.object()? | ||
.peel_to_kind(git::object::Kind::Commit) | ||
.context("Need commitish as starting point")? | ||
.id | ||
.attach(&repo); | ||
for commit in commit_id.ancestors().all()? { | ||
writeln!(out, "{}", commit?.to_hex())?; | ||
} | ||
Ok(()) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,10 @@ | ||
mod list; | ||
pub use list::list; | ||
mod explain; | ||
pub use explain::explain; | ||
|
||
pub mod resolve; | ||
pub use resolve::function::resolve; | ||
|
||
mod previous_branches; | ||
pub use previous_branches::function as previous_branches; | ||
pub use previous_branches::previous_branches; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters