Skip to content

Commit

Permalink
fix(main): make --from optional
Browse files Browse the repository at this point in the history
  • Loading branch information
cburgdorf committed Apr 1, 2015
1 parent bcb7d42 commit 86dd25d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main.rs
Expand Up @@ -51,7 +51,6 @@ fn main () {
.arg(Arg::new("from")
.help("e.g. 12a8546")
.long("from")
.required(true)
.takes_value(true))
.arg(Arg::new("to")
.long("to")
Expand All @@ -68,7 +67,7 @@ fn main () {
let log_reader_config = LogReaderConfig {
grep: "^feat|^fix|BREAKING'".to_owned(),
format: "%H%n%s%n%b%n==END==".to_owned(),
from: if matches.is_present("from-latest-tag") { Some(git::get_latest_tag()) } else { Some(matches.value_of("from").unwrap().to_owned()) },
from: if matches.is_present("from-latest-tag") { Some(git::get_latest_tag()) } else { matches.value_of("from").map(|v| v.to_owned()) },
to: matches.value_of("to").unwrap_or("").to_owned()
};

Expand Down

0 comments on commit 86dd25d

Please sign in to comment.