static void unload_one_branch ( void ) {
 while ( cur_active_branches && cur_active_branches >= max_active_branches ) {
 uintmax_t min_commit = ULONG_MAX ;
 struct branch * e , * l = NULL , * p = NULL ;
 for ( e = active_branches ;
 e ;
 e = e -> active_next_branch ) {
 if ( e -> last_commit < min_commit ) {
 p = l ;
 min_commit = e -> last_commit ;
 }
 l = e ;
 }
 if ( p ) {
 e = p -> active_next_branch ;
 p -> active_next_branch = e -> active_next_branch ;
 }
 else {
 e = active_branches ;
 active_branches = e -> active_next_branch ;
 }
 e -> active = 0 ;
 e -> active_next_branch = NULL ;
 if ( e -> branch_tree . tree ) {
 release_tree_content_recursive ( e -> branch_tree . tree ) ;
 e -> branch_tree . tree = NULL ;
 }
 cur_active_branches -- ;
 }
 }
static void unload_one_branch ( void ) {
 while ( cur_active_branches && cur_active_branches >= max_active_branches ) {
 uintmax_t min_commit = ULONG_MAX ;
 struct branch * e , * l = NULL , * p = NULL ;
 for ( e = active_branches ;
 e ;
 e = e -> active_next_branch ) {
 if ( e -> last_commit < min_commit ) {
 p = l ;
 min_commit = e -> last_commit ;
 }
 l = e ;
 }
 if ( p ) {
 e = p -> active_next_branch ;
 p -> active_next_branch = e -> active_next_branch ;
 }
 else {
 e = active_branches ;
 active_branches = e -> active_next_branch ;
 }
 e -> active = 0 ;
 e -> active_next_branch = NULL ;
 if ( e -> branch_tree . tree ) {
 release_tree_content_recursive ( e -> branch_tree . tree ) ;
 e -> branch_tree . tree = NULL ;
 }
 cur_active_branches -- ;
 }
 }