499 pushstrat = PUSH_STRATEGY_METADATA; |
499 pushstrat = PUSH_STRATEGY_METADATA; |
500 } else if(xstreq(value, "hash")) { |
500 } else if(xstreq(value, "hash")) { |
501 pushstrat = PUSH_STRATEGY_HASH; |
501 pushstrat = PUSH_STRATEGY_HASH; |
502 } |
502 } |
503 } |
503 } |
504 } else if(xstreq(node->name, "symlinks")) { |
504 } else if(xstreq(node->name, "symlink-intern")) { |
505 uint32_t symlinkconfig = 0; |
505 if(!value) { |
506 const char *delims = " ,\r\n"; |
506 print_error(node->line, "missing value"); |
507 char *cmdstr = strdup(value); |
507 } else if(xstreq(value, "sync")) { |
508 char *s = strtok(cmdstr, delims); |
508 symlink |= SYNC_SYMLINK_SYNC; |
509 while(s) { |
509 } else if(xstreq(value, "follow")) { |
510 if(!strcmp(s, "sync")) { |
510 // nothing, default |
511 symlinkconfig |= SYNC_SYMLINK_SYNC; |
511 } else if(xstreq(value, "ignore")) { |
512 } else if(!strcmp(s, "extern_nofollow")) { |
512 symlink |= SYNC_SYMLINK_IGNORE_INTERN; |
513 symlinkconfig |= SYNC_SYMLINK_EXTERN_NOFOLLOW; |
513 } else { |
514 } else if(!strcmp(s, "intern_nofollow")) { |
514 print_error(node->line, |
515 symlinkconfig |= SYNC_SYMLINK_INTERN_NOFOLLOW; |
515 "unknown value: %s\n", value); |
516 } |
516 } |
517 s = strtok(NULL, delims); |
517 } else if(xstreq(node->name, "symlink-extern")) { |
518 } |
518 if(!value) { |
519 free(cmdstr); |
519 print_error(node->line, "missing value"); |
520 symlink = symlinkconfig; |
520 } else if(xstreq(value, "follow")) { |
|
521 // nothing, default |
|
522 } else if(xstreq(value, "ignore")) { |
|
523 symlink |= SYNC_SYMLINK_IGNORE_EXTERN; |
|
524 } else { |
|
525 print_error(node->line, |
|
526 "unknown value: %s\n", value); |
|
527 } |
521 } else { |
528 } else { |
522 print_error(node->line, |
529 print_error(node->line, |
523 "unknown directory config element: %s\n", node->name); |
530 "unknown directory config element: %s\n", node->name); |
524 return 1; |
531 return 1; |
525 } |
532 } |