chlog: default the history cap to 50
An entry listing 500 commits is not a useful draft, and 50 keeps the default window small enough that even the first run on a kernel-sized tree stays instant. --limit still takes any value, 0 for unlimited.
This commit is contained in:
1 parent
0a24db28bc
commit
8e6035c185
2 files changed
+4
-7
No files matched your search
@@ -118,9 +118,9 @@ with `--file <path>` (`-f`).
|
|||||||
|
|
||||||
`pkh chlog` walks the commit history back to the previous changelog entry.
|
`pkh chlog` walks the commit history back to the previous changelog entry.
|
||||||
That walk, and the list of commits the entry is built from, are capped at
|
That walk, and the list of commits the entry is built from, are capped at
|
||||||
500 commits (`--limit <n>`, `0` = unlimited): a boundary far behind HEAD —
|
50 commits (`--limit <n>`, `0` = unlimited): a boundary far behind HEAD —
|
||||||
a stale version tag in a kernel-sized history — truncates the entry to the
|
a stale version tag in a kernel-sized history — truncates the entry to the
|
||||||
newest 500 commits instead of crawling the whole range, which keeps the
|
newest 50 commits instead of crawling the whole range, which keeps the
|
||||||
run fast on large histories.
|
run fast on large histories.
|
||||||
|
|
||||||
### Incremental builds (build records)
|
### Incremental builds (build records)
|
||||||
|
|||||||
+2
-5
@@ -367,7 +367,7 @@ fn main() {
|
|||||||
.arg(arg!(-v --version <version> "Target version (overrides the --backport/--nmu/--rebuild numbering)").required(false))
|
.arg(arg!(-v --version <version> "Target version (overrides the --backport/--nmu/--rebuild numbering)").required(false))
|
||||||
.arg(arg!(-f --file <path> "Path to the changelog file to generate into and edit (default: debian/changelog)").required(false).default_value("debian/changelog"))
|
.arg(arg!(-f --file <path> "Path to the changelog file to generate into and edit (default: debian/changelog)").required(false).default_value("debian/changelog"))
|
||||||
.arg(arg!(--limit <n> "Cap how far back the history is searched for the previous changelog entry, and how many commits the entry lists (0 = unlimited)").required(false)
|
.arg(arg!(--limit <n> "Cap how far back the history is searched for the previous changelog entry, and how many commits the entry lists (0 = unlimited)").required(false)
|
||||||
.value_parser(clap::value_parser!(usize)).default_value("500")),
|
.value_parser(clap::value_parser!(usize)).default_value("50")),
|
||||||
)
|
)
|
||||||
.subcommand(
|
.subcommand(
|
||||||
Command::new("build")
|
Command::new("build")
|
||||||
@@ -726,10 +726,7 @@ fn main() {
|
|||||||
info!("Done.");
|
info!("Done.");
|
||||||
}
|
}
|
||||||
Some(("chlog", sub_matches)) => {
|
Some(("chlog", sub_matches)) => {
|
||||||
let history_limit = sub_matches
|
let history_limit = sub_matches.get_one::<usize>("limit").copied().unwrap_or(50);
|
||||||
.get_one::<usize>("limit")
|
|
||||||
.copied()
|
|
||||||
.unwrap_or(500);
|
|
||||||
let changelog_file = sub_matches
|
let changelog_file = sub_matches
|
||||||
.get_one::<String>("file")
|
.get_one::<String>("file")
|
||||||
.map(|s| s.to_string())
|
.map(|s| s.to_string())
|
||||||
|
|||||||
Reference in new issue
Block a user