Skip to content

Commit

Permalink
fix(from-context): revert stdin handling
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Aug 23, 2024
1 parent 3e7c395 commit 135938f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
13 changes: 2 additions & 11 deletions git-cliff/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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 {
Expand Down
3 changes: 0 additions & 3 deletions website/docs/usage/load-context.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 135938f

Please sign in to comment.