ref_transaction_create(): disallow recursive pruning

It is nonsensical (and a little bit dangerous) to use REF_ISPRUNING
without REF_NODEREF. Forbid it explicitly. Change the one REF_ISPRUNING
caller to pass REF_NODEREF too.

Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
This commit is contained in:
Michael Haggerty
2016-04-24 09:48:26 +02:00
parent 0568c8e9dc
commit c52ce248d6
3 changed files with 5 additions and 2 deletions

View File

@ -15,7 +15,7 @@
/*
* Used as a flag in ref_update::flags when a loose ref is being
* pruned.
* pruned. This flag must only be used when REF_NODEREF is set.
*/
#define REF_ISPRUNING 0x04