chiark
/
gitweb
/
~ianmdlvl
/
otter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4d50cfb
)
script: lower: Bail early if no targets
author
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 10 Jul 2021 12:36:36 +0000
(13:36 +0100)
committer
Ian Jackson
<ijackson@chiark.greenend.org.uk>
Sat, 10 Jul 2021 15:24:51 +0000
(16:24 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
templates/script.ts
patch
|
blob
|
history
diff --git
a/templates/script.ts
b/templates/script.ts
index 150353b094f4d64855479574202d272b4a87a7c2..e43819c1547a358f00d60d9ba281ca235e344d11 100644
(file)
--- a/
templates/script.ts
+++ b/
templates/script.ts
@@
-646,10
+646,13
@@
function lower_pieces(targets_todo: LowerTodoList):
let bottommost_unbottom : Entry | null = null;
let n_targets_todo_unbottom = 0;
+ let any_targets = false;
for (const piece of Object.keys(targets_todo)) {
+ any_targets = true;
let p = targets_todo[piece];
if (!p.bottom) n_targets_todo_unbottom++;
}
+ if (!any_targets) return 'Nothing to lower!';
let walk = pieces_marker;
for (;;) { // starting at the bottom of the stack order