diff --git a/git-cliff/src/lib.rs b/git-cliff/src/lib.rs index badb9bd705..cfe6cff1ba 100644 --- a/git-cliff/src/lib.rs +++ b/git-cliff/src/lib.rs @@ -45,14 +45,8 @@ use std::fs::{ self, File, }; -use std::io::{ - self, - IsTerminal, -}; -use std::path::{ - Path, - PathBuf, -}; +use std::io; +use std::path::Path; use std::time::{ SystemTime, UNIX_EPOCH, @@ -527,9 +521,6 @@ pub fn run(mut args: Opt) -> Result<()> { if args.count_tags.is_some() { config.git.count_tags.clone_from(&args.count_tags); } - if !std::io::stdin().is_terminal() { - args.from_context = Some(PathBuf::from("-")); - } // Process commits and releases for the changelog. if let Some(BumpOption::Specific(bump_type)) = args.bump { diff --git a/website/docs/usage/load-context.md b/website/docs/usage/load-context.md index adf3cfa419..fd4a5a8cd1 100644 --- a/website/docs/usage/load-context.md +++ b/website/docs/usage/load-context.md @@ -21,9 +21,6 @@ git cliff --from-context context.json # process context loaded from stdin git cliff --from-context - - -# or simply -cat context.json | git-cliff ``` Free-form metadata can be added to release objects and commit objects in the context using the `extra` field: