On Tue, Jun 25, 2019 at 3:00 PM Junio C Hamano <gitster@xxxxxxxxx> wrote: > > Matheus Tavares <matheus.bernardino@xxxxxx> writes: > > This hunk, which claims to have 25 lines in the postimage ... > > > @@ -44,6 +45,25 @@ > > * dir_iterator_advance() again. > > */ > > > > +/* > > + * Flags for dir_iterator_begin: > > + * > > + * - DIR_ITERATOR_PEDANTIC: override dir-iterator's default behavior > > + * in case of an error at dir_iterator_advance(), which is to keep > > + * looking for a next valid entry. With this flag, resources are freed > > + * and ITER_ERROR is returned immediately. In both cases, a meaningful > > + * warning is emitted. Note: ENOENT errors are always ignored so that > > + * the API users may remove files during iteration. > > + * > > + * - DIR_ITERATOR_FOLLOW_SYMLINKS: make dir-iterator follow symlinks. > > + * i.e., linked directories' contents will be iterated over and > > + * iter->base.st will contain information on the referred files, > > + * not the symlinks themselves, which is the default behavior. > > + * Recursive symlinks are skipped with a warning and broken symlinks > > + * are ignored. > > + */ > > +#define DIR_ITERATOR_PEDANTIC (1 << 0) > > +#define DIR_ITERATOR_FOLLOW_SYMLINKS (1 << 1) > > + > > struct dir_iterator { > > /* The current path: */ > > struct strbuf path; > > @@ -58,29 +78,38 @@ struct dir_iterator { > > ... adds 20 lines, making the postimage 26 lines long. > > Did you hand edit your patch? It is OK to do so, as long as you > know what you are doing ;-). Adjust the length of the postimage on > the @@ ... @@ line to make it consistent with the patch text, and > also make sure a tweak you do here won't make later patches not > apply. Oh, I'm sorry for that, I'll be more careful with hand editing next time. Thanks for the advice. I think for this time it won't affect the later patches as it was a minor addition at one comment, but should I perhaps re-send it?