From: Alexandr Miloslavskiy Date: Tue, 05 Nov 2019 19:14:02 GMT Subject: Re: [PATCH 1/5] pathspec: add new function to parse file Message-ID: <2145317c-873c-19b9-6ec9-7502656a27ff@syntevo.com> In-Reply-To: On 05.11.2019 16:02, Phillip Wood wrote: >> +    if (!in) >> +        die(_("could not open '%s' for reading"), file); > > die_errno() would give a more informative message here Thanks for the pointer! >> +            if (unquote_c_style(&unquoted, buf.buf, NULL)) >> +                die(_("line is badly quoted")); > > It would be nice to show the offending line in the error message Good idea. >> +void parse_pathspec_file(struct pathspec *pathspec, >> +            unsigned magic_mask, >> +            unsigned flags, >> +            const char *prefix, >> +            const char *file, >> +            int nul_term_line); > > Do these align with the 's' in "struct pathspec" ? Sorry, still struggling with my VS that tries to do crazy things. Will fix.