Add cyclic dependence detection.
If a depends on b which depends on a, redo would just freeze. Now it aborts with a somewhat helpful error message. [Updated by apenwarr for coding style and to add a test.]
This commit is contained in:
parent
63f9dcb640
commit
7dd63efb37
8 changed files with 32 additions and 1 deletions
1
t/355-deps-cyclic/a.do
Normal file
1
t/355-deps-cyclic/a.do
Normal file
|
|
@ -0,0 +1 @@
|
|||
redo-ifchange b
|
||||
2
t/355-deps-cyclic/all.do
Normal file
2
t/355-deps-cyclic/all.do
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
. ../skip-if-minimal-do.sh
|
||||
! redo a >/dev/null 2>&1 || exit 204
|
||||
1
t/355-deps-cyclic/b.do
Normal file
1
t/355-deps-cyclic/b.do
Normal file
|
|
@ -0,0 +1 @@
|
|||
redo-ifchange a
|
||||
1
t/355-deps-cyclic/clean.do
Normal file
1
t/355-deps-cyclic/clean.do
Normal file
|
|
@ -0,0 +1 @@
|
|||
rm -f *~ a b
|
||||
Loading…
Add table
Add a link
Reference in a new issue