Re: [PATCH 4/4] archive: queue directories for all types of pathspecs

2017-09-13 Thread René Scharfe
Am 13.09.2017 um 14:53 schrieb Jeff King: > On Wed, Sep 13, 2017 at 12:43:57AM +0200, René Scharfe wrote: >> Yet another way is have a few levels of nested subdirectories (e.g. >> d1/d2/d3/file1) and ignoring the entries at the leaved (e.g. file1). > > s/leaved/leaves/ ? Indeed. René

Re: [PATCH 4/4] archive: queue directories for all types of pathspecs

2017-09-13 Thread Jeff King
On Wed, Sep 13, 2017 at 12:43:57AM +0200, René Scharfe wrote: > -- >8 -- > Subject: [PATCH] archive: don't add empty directories to archives > > While git doesn't track empty directories, git archive can be tricked > into putting some into archives. One way is to construct an empty tree >

Re: [PATCH 4/4] archive: queue directories for all types of pathspecs

2017-09-12 Thread René Scharfe
Am 20.08.2017 um 11:06 schrieb Jeff King: > I actually think it would be reasonable to omit the empty directory in > t5004. The main thing we care about there is that we produce an archive > with no files rather than barfing. Checking that the empty directory is > actually there was mostly "this

Re: [PATCH 4/4] archive: queue directories for all types of pathspecs

2017-08-21 Thread Stefan Beller
On Sat, Aug 19, 2017 at 9:53 AM, René Scharfe wrote: > Am 19.08.2017 um 07:33 schrieb René Scharfe: >> When read_tree_recursive() encounters a directory excluded by a pathspec >> then it enters it anyway because it might contain included entries. It >> calls the callback function

Re: [PATCH 4/4] archive: queue directories for all types of pathspecs

2017-08-20 Thread Jeff King
On Sat, Aug 19, 2017 at 06:53:26PM +0200, René Scharfe wrote: > Am 19.08.2017 um 07:33 schrieb René Scharfe: > > When read_tree_recursive() encounters a directory excluded by a pathspec > > then it enters it anyway because it might contain included entries. It > > calls the callback function

Re: [PATCH 4/4] archive: queue directories for all types of pathspecs

2017-08-19 Thread Junio C Hamano
René Scharfe writes: > No, it's "archive empty subtree by direct pathspec" that's broken. Gah! > >> omitting the empty directory from the archive. Sorry for missing that! >> >> This is kind of a bonus patch, so please discard it for now; the first >> three are OK IMHO. Ah, our

Re: [PATCH 4/4] archive: queue directories for all types of pathspecs

2017-08-19 Thread René Scharfe
Am 19.08.2017 um 18:53 schrieb René Scharfe: > Am 19.08.2017 um 07:33 schrieb René Scharfe: >> When read_tree_recursive() encounters a directory excluded by a pathspec >> then it enters it anyway because it might contain included entries. It >> calls the callback function before it is able to

Re: [PATCH 4/4] archive: queue directories for all types of pathspecs

2017-08-19 Thread Junio C Hamano
René Scharfe writes: > When read_tree_recursive() encounters a directory excluded by a pathspec > then it enters it anyway because it might contain included entries. It > calls the callback function before it is able to decide if the directory > is actually needed. > > For that

Re: [PATCH 4/4] archive: queue directories for all types of pathspecs

2017-08-19 Thread René Scharfe
Am 19.08.2017 um 07:33 schrieb René Scharfe: > When read_tree_recursive() encounters a directory excluded by a pathspec > then it enters it anyway because it might contain included entries. It > calls the callback function before it is able to decide if the directory > is actually needed. > >

[PATCH 4/4] archive: queue directories for all types of pathspecs

2017-08-18 Thread René Scharfe
When read_tree_recursive() encounters a directory excluded by a pathspec then it enters it anyway because it might contain included entries. It calls the callback function before it is able to decide if the directory is actually needed. For that reason git archive adds directories to a queue and