Skip to content
  • Jeff King's avatar
    cvsimport: fix usage of cvsimport.module · 67d23242
    Jeff King authored and Junio C Hamano's avatar Junio C Hamano committed
    There were two problems:
    
      1. We only look at the config variable if there is no module
         given on the command line. We checked this by comparing
         @argv == 0. However, at the time of the comparison, we
         have not yet parsed the dashed options, meaning that
         "git cvsimport" would read the variable but "git
         cvsimport -a" would not. This is fixed by simply moving
         the check after the call to getopt.
    
      2. If the config variable did not exist, we were adding an
         empty string to @argv
    
    . The rest of the script, rather
         than barfing for insufficient input, would then try to
         import the module '', leading to rather confusing error
         messages. Based on patch from Emanuele Giaquinta.
    
    Signed-off-by: default avatarJeff King <peff@peff.net>
    Signed-off-by: default avatarJunio C Hamano <gitster@pobox.com>
    67d23242