[control] API fixes: atomic Idempotency-Key reservation, no echo of odd field names or path parameters, askpass answers only password prompts, file protocol not forced, token test split on the known prefix, serialisation test without second-resolution times

This commit is contained in:
2026-11-07 18:57:54 +01:00
parent 54574702ea
commit f382fe2f76
7 changed files with 158 additions and 51 deletions
+17 -10
View File
@@ -386,17 +386,24 @@ mod unix {
r["commit"].as_str().unwrap().to_owned(),
));
}
// One after another: each starts after the previous finished, and each commit's
// parent is the previous commit (a linear history, nothing lost).
spans.sort();
for w in spans.windows(2) {
assert!(w[1].0 >= w[0].1, "overlap: {w:?}");
assert_eq!(
env.git(&["rev-parse", &format!("{}^", w[1].2)]),
w[0].2,
"linear"
);
// One after another: the five commits form one linear chain at the head (nothing
// lost, nothing interleaved). Timestamps have one-second resolution, so they are not
// compared.
let commits: Vec<String> = spans.iter().map(|s| s.2.clone()).collect();
let mut chain = Vec::new();
let mut c = env.head();
for _ in 0..commits.len() {
chain.push(c.clone());
c = env.git(&["rev-parse", &format!("{c}^")]);
}
let mut sorted_chain = chain.clone();
sorted_chain.sort();
let mut sorted_commits = commits.clone();
sorted_commits.sort();
assert_eq!(
sorted_chain, sorted_commits,
"a linear chain of the five commits"
);
let files = env.head_files();
for n in names {
assert!(