Re: [PATCH 2/2] pathspec: give better message for submodule related pathspec error

2017-01-03 Thread Jeff King
On Tue, Jan 03, 2017 at 05:48:35PM -0800, Stefan Beller wrote: > Every once in a while someone complains to the mailing list to have > run into this weird assertion[1]. The usual response from the mailing > list is link to old discussions[2], and acknowledging the problem > stating it is known. >

Re: [RFC PATCH 0/5] Localise error headers

2017-01-03 Thread Jeff King
On Mon, Jan 02, 2017 at 12:14:49PM +0100, Michael J Gruber wrote: > Currently, the headers "error: ", "warning: " etc. - generated by die(), > warning() etc. - are not localized, but we feed many localized error messages > into these functions so that we produce error messages with mixed >

Re: [PATCH v4 0/5] road to reentrant real_path

2017-01-03 Thread Jeff King
On Wed, Jan 04, 2017 at 07:56:02AM +0100, Torsten Bögershausen wrote: > On 04.01.17 01:48, Jeff King wrote: > > On Tue, Jan 03, 2017 at 11:09:18AM -0800, Brandon Williams wrote: > > > >> Only change with v4 is in [1/5] renaming the #define MAXSYMLINKS back to > >> MAXDEPTH due to a naming

Re: [PATCH v4 0/5] road to reentrant real_path

2017-01-03 Thread Torsten Bögershausen
On 04.01.17 01:48, Jeff King wrote: > On Tue, Jan 03, 2017 at 11:09:18AM -0800, Brandon Williams wrote: > >> Only change with v4 is in [1/5] renaming the #define MAXSYMLINKS back to >> MAXDEPTH due to a naming conflict brought up by Lars Schneider. > > Hmm. Isn't MAXSYMLINKS basically what you

[PATCHv4 0/2] pathspec: give better message for submodule related pathspec error

2017-01-03 Thread Stefan Beller
> It MIGHT be a handy hack when writing a test, but let's stop doing > that insanity. No sane project does that in real life, doesn't it? > Create a subdirectory, make it a repository, have a commit there and > bind that as our own submodule. That would be a more normal way to > start your own

[PATCH 1/2] submodule tests: don't use itself as a submodule

2017-01-03 Thread Stefan Beller
In reality nobody would run "git submodule add ./. " to add the repository to itself as a submodule as this comes with some nasty surprises, such as infinite recursion when cloning that repository. However we do this all the time in the test suite, because most of the time this was the most

[PATCH 2/2] pathspec: give better message for submodule related pathspec error

2017-01-03 Thread Stefan Beller
Every once in a while someone complains to the mailing list to have run into this weird assertion[1]. The usual response from the mailing list is link to old discussions[2], and acknowledging the problem stating it is known. This patch accomplishes two things: 1. Switch assert() to die("BUG")

Re: [PATCH] pathspec: give better message for submodule related pathspec error

2017-01-03 Thread Jeff King
On Tue, Jan 03, 2017 at 10:15:38AM -0800, Stefan Beller wrote: > > I take that the new "BUG" thing tells the Git developers that no > > sane codepath should throw an pathspec_item that satisfies the > > condition of the if() statement for non-submodules? > > If we want to keep the semantics of

Re: [PATCHv2] submodule.c: use GIT_DIR_ENVIRONMENT consistently

2017-01-03 Thread Jeff King
On Tue, Jan 03, 2017 at 10:30:47AM -0800, Stefan Beller wrote: > In C code we have the luxury of having constants for all the important > things that are hard coded. This is the only place in C, that hard codes > the git directory environment variable, so fix it. > > Signed-off-by: Stefan Beller

Re: builtin difftool parsing issue

2017-01-03 Thread Jacob Keller
On Tue, Jan 3, 2017 at 10:47 AM, Stefan Beller wrote: > On Mon, Jan 2, 2017 at 11:05 AM, Paul Sbarra wrote: >>> I would have expected `git difftool --submodule=diff ...` to work... What >>> are the problems? >> >> The docs for difftool state... >> "git

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-03 Thread Jeff King
On Tue, Jan 03, 2017 at 12:11:25PM -0800, Stefan Beller wrote: > On Mon, Jan 2, 2017 at 8:22 AM, Johannes Schindelin > wrote: > > Technically, it is correct that git_exec_path() returns a possibly > > malloc()ed string. Practically, it is *sometimes* not malloc()ed.

Re: [PATCH v4 4/5] real_path: have callers use real_pathdup and strbuf_realpath

2017-01-03 Thread Jacob Keller
On Tue, Jan 3, 2017 at 11:09 AM, Brandon Williams wrote: > Migrate callers of real_path() who duplicate the retern value to use > real_pathdup or strbuf_realpath. Nit: s/retern/return

[PATCH 0/4] fix mergetool+rerere+subdir regression

2017-01-03 Thread Richard Hansen
If rerere is enabled, no pathnames are given, and mergetool is run from a subdirectory, mergetool always prints "No files need merging". Fix the bug. This regression was introduced in 57937f70a09c12ef484c290865dac4066d207c9c (v2.11.0). Richard Hansen (4): t7610: update branch names to match

[PATCH 1/4] t7610: update branch names to match test number

2017-01-03 Thread Richard Hansen
Rename the testNN branches so that NN matches the test number. This should make it easier to troubleshoot test issues. Use $test_count to keep this future-proof. Signed-off-by: Richard Hansen --- t/t7610-mergetool.sh | 82

[PATCH 4/4] mergetool: fix running in subdir when rerere enabled

2017-01-03 Thread Richard Hansen
If rerere is enabled and no pathnames are given, run cd_to_toplevel before running 'git diff --name-only' so that 'git diff --name-only' sees the pathnames emitted by 'git rerere remaining'. Also run cd_to_toplevel before running 'git rerere remaining' in case 'git rerere remaining' is ever

[PATCH 3/4] t7610: add test case for rerere+mergetool+subdir bug

2017-01-03 Thread Richard Hansen
If rerere is enabled and mergetool is run from a subdirectory, mergetool always prints "No files need merging". Add an expected failure test case for this situation. Signed-off-by: Richard Hansen --- t/t7610-mergetool.sh | 21 - 1 file changed, 20

[PATCH 2/4] t7610: make tests more independent and debuggable

2017-01-03 Thread Richard Hansen
If a test fails it might leave the repository in a strange state. Add 'git reset --hard' at the beginning of each test to increase the odds of passing when an earlier test fails. Also use test-specific branches to avoid interfering with later tests and to make the tests easier to debug.

Re: [PATCH v4 0/5] road to reentrant real_path

2017-01-03 Thread Jeff King
On Tue, Jan 03, 2017 at 11:09:18AM -0800, Brandon Williams wrote: > Only change with v4 is in [1/5] renaming the #define MAXSYMLINKS back to > MAXDEPTH due to a naming conflict brought up by Lars Schneider. Hmm. Isn't MAXSYMLINKS basically what you want here, though? It what's what all other

Re: [PATCH] archive-zip: load userdiff config

2017-01-03 Thread Jeff King
On Tue, Jan 03, 2017 at 06:24:39PM +0100, René Scharfe wrote: > Am 02.01.2017 um 23:25 schrieb Jeff King: > > Since 4aff646d17 (archive-zip: mark text files in archives, > > 2015-03-05), the zip archiver will look at the userdiff > > driver to decide whether a file is text or binary. This > >

Re: [PATCH v4 1/4] Avoid Coverity warning about unfree()d git_exec_path()

2017-01-03 Thread Stefan Beller
On Mon, Jan 2, 2017 at 8:22 AM, Johannes Schindelin wrote: > Technically, it is correct that git_exec_path() returns a possibly > malloc()ed string. Practically, it is *sometimes* not malloc()ed. So > let's just use a static variable to make it a singleton. That'll

Re: [PATCH v2] git-p4: do not pass '-r 0' to p4 commands

2017-01-03 Thread Ori Rawlings
Looks good to me. Ori Rawlings

[PATCH v3 1/2] don't use test_must_fail with grep

2017-01-03 Thread Pranit Bauva
test_must_fail should only be used for testing git commands. To test the failure of other commands use `!`. Reported-by: Stefan Beller Signed-off-by: Pranit Bauva --- t/t3510-cherry-pick-sequence.sh | 6 +++--- t/t5504-fetch-receive-strict.sh | 2

[PATCH v3 2/2] t9813: avoid using pipes

2017-01-03 Thread Pranit Bauva
The exit code of the upstream in a pipe is ignored thus we should avoid using it. By writing out the output of the git command to a file, we can test the exit codes of both the commands. Signed-off-by: Pranit Bauva --- t/t9813-git-p4-preserve-users.sh | 8 1

Re: [PATCH v2 2/2] t9813: avoid using pipes

2017-01-03 Thread Stefan Beller
> > git p4 commit >actual && > grep "git author de...@example.com does not match" actual && > > What do you think? >From the travis logs: 'actual.err' is not empty, it contains: ... - file(s) up-to-date. I think(/hope) such a progress is tested for at another test, and not relevant here

Re: [PATCH v2 2/2] t9813: avoid using pipes

2017-01-03 Thread Pranit Bauva
Hey Stefan, On Tue, Jan 3, 2017 at 11:28 PM, Stefan Beller wrote: > On Mon, Jan 2, 2017 at 10:45 AM, Pranit Bauva wrote: >> The exit code of the upstream in a pipe is ignored thus we should avoid >> using it. > > for commands under test, i.e. git

Re: [RFC PATCH 0/5] Localise error headers

2017-01-03 Thread Stefan Beller
On Mon, Jan 2, 2017 at 3:14 AM, Michael J Gruber wrote: > Currently, the headers "error: ", "warning: " etc. - generated by die(), > warning() etc. - are not localized, but we feed many localized error messages > into these functions so that we produce error messages

Re: Wanted: shallow submodule clones with --no-single-branch.

2017-01-03 Thread Stefan Beller
On Fri, Dec 30, 2016 at 2:50 AM, Tor Andersson wrote: > Hi, > > When adding submodules with --depth=1 only the master branch is > cloned. This often leaves the submodule pointing to a non-existing > commit. You can also use the "--branch=not_master" flag to track another branch.

[PATCH v4 16/16] pathspec: rename prefix_pathspec to init_pathspec_item

2017-01-03 Thread Brandon Williams
Give a more relevant name to the prefix_pathspec function as it does more than just prefix a pathspec element. Signed-off-by: Brandon Williams --- pathspec.c | 24 +++- 1 file changed, 7 insertions(+), 17 deletions(-) diff --git a/pathspec.c b/pathspec.c

[PATCH v4 12/16] pathspec: create parse_long_magic function

2017-01-03 Thread Brandon Williams
Factor out the logic responsible for parsing long magic into its own function. As well as hoist the prefix check logic outside of the inner loop as there isn't anything that needs to be done after matching "prefix:". Signed-off-by: Brandon Williams --- pathspec.c | 92

[PATCH v4 3/5] real_path: create real_pathdup

2017-01-03 Thread Brandon Williams
Create real_pathdup which returns a caller owned string of the resolved realpath based on the provide path. Signed-off-by: Brandon Williams --- abspath.c | 13 + cache.h | 1 + 2 files changed, 14 insertions(+) diff --git a/abspath.c b/abspath.c index

[PATCH v4 4/5] real_path: have callers use real_pathdup and strbuf_realpath

2017-01-03 Thread Brandon Williams
Migrate callers of real_path() who duplicate the retern value to use real_pathdup or strbuf_realpath. Signed-off-by: Brandon Williams --- builtin/init-db.c | 6 +++--- environment.c | 2 +- setup.c | 13 - sha1_file.c | 2 +- submodule.c

[PATCH v4 2/5] real_path: convert real_path_internal to strbuf_realpath

2017-01-03 Thread Brandon Williams
Change the name of real_path_internal to strbuf_realpath. In addition push the static strbuf up to its callers and instead take as a parameter a pointer to a strbuf to use for the final result. This change makes strbuf_realpath reentrant. Signed-off-by: Brandon Williams ---

[PATCH v4 5/5] real_path: canonicalize directory separators in root parts

2017-01-03 Thread Brandon Williams
From: Johannes Sixt When an absolute path is resolved, resolution begins at the first path component after the root part. The root part is just copied verbatim, because it must not be inspected for symbolic links. For POSIX paths, this is just the initial slash, but on Windows,

[PATCH v4 1/5] real_path: resolve symlinks by hand

2017-01-03 Thread Brandon Williams
The current implementation of real_path uses chdir() in order to resolve symlinks. Unfortunately this isn't thread-safe as chdir() affects a process as a whole and not just an individual thread. Instead perform the symlink resolution by hand so that the calls to chdir() can be removed, making

[PATCH v4 02/16] dir: remove struct path_simplify

2017-01-03 Thread Brandon Williams
Teach simplify_away() and exclude_matches_pathspec() to handle struct pathspec directly, eliminating the need for the struct path_simplify. Also renamed the len parameter to pathlen in exclude_matches_pathspec() to match the parameter names used in simplify_away(). Signed-off-by: Brandon

[PATCH v4 0/5] road to reentrant real_path

2017-01-03 Thread Brandon Williams
Only change with v4 is in [1/5] renaming the #define MAXSYMLINKS back to MAXDEPTH due to a naming conflict brought up by Lars Schneider. Brandon Williams (4): real_path: resolve symlinks by hand real_path: convert real_path_internal to strbuf_realpath real_path: create real_pathdup

[PATCH v4 00/16] pathspec cleanup

2017-01-03 Thread Brandon Williams
v4 addresses a few comments from Duy. * [2/16] push the guard pathspec macro into simplify_away() and exclude_matches_pathsepc(). * [6/16] when freeing a pathspec struct, set pathsepc->nr = 0. * [8/16] tweak the die message when using unsupported magic to be more human readable. Brandon

Re: What's cooking in git.git (Dec 2016, #08; Tue, 27)

2017-01-03 Thread Brandon Williams
On 12/29, Lars Schneider wrote: > > > On 28 Dec 2016, at 00:11, Junio C Hamano wrote: > > > > > > * bw/realpath-wo-chdir (2016-12-22) 5 commits > > (merged to 'next' on 2016-12-22 at fea8fa870f) > > + real_path: canonicalize directory separators in root parts > > +

[PATCH v4 15/16] pathspec: small readability changes

2017-01-03 Thread Brandon Williams
A few small changes to improve readability. This is done by grouping related assignments, adding blank lines, ensuring lines are <80 characters, and adding additional comments. Signed-off-by: Brandon Williams --- pathspec.c | 25 +++-- 1 file changed, 15

[PATCH v4 13/16] pathspec: create parse_element_magic helper

2017-01-03 Thread Brandon Williams
Factor out the logic responsible for the magic in a pathspec element into its own function. Also avoid calling into the parsing functions when `PATHSPEC_LITERAL_PATH` is specified since it causes magic to be ignored and all paths to be treated as literals. Signed-off-by: Brandon Williams

[PATCH v4 11/16] pathspec: create parse_short_magic function

2017-01-03 Thread Brandon Williams
Factor out the logic responsible for parsing short magic into its own function. Signed-off-by: Brandon Williams --- pathspec.c | 54 -- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/pathspec.c b/pathspec.c

[PATCH v4 06/16] pathspec: copy and free owned memory

2017-01-03 Thread Brandon Williams
The 'original' string entry in a pathspec_item is only duplicated some of the time, instead always make a copy of the original and take ownership of the memory. Since both 'match' and 'original' string entries in a pathspec_item are owned by the pathspec struct, they need to be freed when

[PATCH v4 05/16] pathspec: remove the deprecated get_pathspec function

2017-01-03 Thread Brandon Williams
Now that all callers of the old 'get_pathspec' interface have been migrated to use the new pathspec struct interface it can be removed from the codebase. Since there are no more users of the '_raw' field in the pathspec struct it can also be removed. This patch also removes the old functionality

[PATCH v4 14/16] pathspec: create strip submodule slash helpers

2017-01-03 Thread Brandon Williams
Factor out the logic responsible for stripping the trailing slash on pathspecs referencing submodules into its own function. Signed-off-by: Brandon Williams --- pathspec.c | 68 ++ 1 file changed, 42 insertions(+),

[PATCH v4 07/16] pathspec: remove unused variable from unsupported_magic

2017-01-03 Thread Brandon Williams
Removed unused variable 'n' from the 'unsupported_magic()' function. Signed-off-by: Brandon Williams --- pathspec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pathspec.c b/pathspec.c index b8faa8f46..b9a3819d6 100644 --- a/pathspec.c +++

[PATCH v4 08/16] pathspec: always show mnemonic and name in unsupported_magic

2017-01-03 Thread Brandon Williams
For better clarity, always show the mnemonic and name of the unsupported magic being used. This lets users have a more clear understanding of what magic feature isn't supported. And if they supplied a mnemonic, the user will be told what its corresponding name is which will allow them to more

[PATCH v4 09/16] pathspec: simpler logic to prefix original pathspec elements

2017-01-03 Thread Brandon Williams
The logic used to prefix an original pathspec element with 'prefix' magic is more general purpose and can be used for more than just short magic. Remove the extra code paths and rename 'prefix_short_magic' to 'prefix_magic' to better indicate that it can be used in more general situations. Also,

[PATCH v4 04/16] ls-tree: convert show_recursive to use the pathspec struct interface

2017-01-03 Thread Brandon Williams
Convert 'show_recursive()' to use the pathspec struct interface from using the '_raw' entry in the pathspec struct. Signed-off-by: Brandon Williams --- builtin/ls-tree.c | 16 +++- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/builtin/ls-tree.c

[PATCH v4 01/16] mv: remove use of deprecated 'get_pathspec()'

2017-01-03 Thread Brandon Williams
Convert the 'internal_copy_pathspec()' function to 'prefix_path()' instead of using the deprecated 'get_pathspec()' interface. Also, rename 'internal_copy_pathspec()' to 'internal_prefix_pathspec()' to be more descriptive of what the funciton is actually doing. In addition to this, fix a memory

[PATCH v4 10/16] pathspec: factor global magic into its own function

2017-01-03 Thread Brandon Williams
Create helper functions to read the global magic environment variables in additon to factoring out the global magic gathering logic into its own function. Signed-off-by: Brandon Williams --- pathspec.c | 127 + 1

[PATCH v4 03/16] dir: convert fill_directory to use the pathspec struct interface

2017-01-03 Thread Brandon Williams
Convert 'fill_directory()' to use the pathspec struct interface from using the '_raw' entry in the pathspec struct. Signed-off-by: Brandon Williams --- dir.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dir.c b/dir.c index

Re: builtin difftool parsing issue

2017-01-03 Thread Stefan Beller
On Mon, Jan 2, 2017 at 11:05 AM, Paul Sbarra wrote: >> I would have expected `git difftool --submodule=diff ...` to work... What >> are the problems? > > The docs for difftool state... > "git difftool is a frontend to git diff and accepts the same options > and arguments."

[PATCHv2] submodule.c: use GIT_DIR_ENVIRONMENT consistently

2017-01-03 Thread Stefan Beller
In C code we have the luxury of having constants for all the important things that are hard coded. This is the only place in C, that hard codes the git directory environment variable, so fix it. Signed-off-by: Stefan Beller --- v2: argv_array_pushf and realigned. v1:

Re: [PATCH] pathspec: give better message for submodule related pathspec error

2017-01-03 Thread Stefan Beller
On Sat, Dec 31, 2016 at 5:11 PM, Junio C Hamano wrote: > Stefan Beller writes: > >> Every once in a while someone complains to the mailing list to have >> run into this weird assertion[1]. >> >> The usual response from the mailing list is link to old

Re: [PATCH v3 08/16] pathspec: always show mnemonic and name in unsupported_magic

2017-01-03 Thread Brandon Williams
On 01/03, Duy Nguyen wrote: > On Wed, Dec 14, 2016 at 6:14 AM, Brandon Williams wrote: > > @@ -340,8 +336,9 @@ static void NORETURN unsupported_magic(const char > > *pattern, > > continue; > > if (sb.len) > >

Re: [PATCH v2 2/2] t9813: avoid using pipes

2017-01-03 Thread Stefan Beller
On Mon, Jan 2, 2017 at 10:45 AM, Pranit Bauva wrote: > The exit code of the upstream in a pipe is ignored thus we should avoid > using it. for commands under test, i.e. git things. Other parts can be piped if that makes the test easier. Though I guess that can be guessed

Re: What's cooking in git.git (Dec 2016, #08; Tue, 27)

2017-01-03 Thread Brandon Williams
On 01/03, Duy Nguyen wrote: > On Thu, Dec 29, 2016 at 5:06 PM, Duy Nguyen wrote: > > On Thu, Dec 29, 2016 at 1:18 AM, Brandon Williams wrote: > >> On 12/27, Junio C Hamano wrote: > >>> * bw/pathspec-cleanup (2016-12-14) 16 commits > >>> - pathspec: rename

Re: [PATCH] don't use test_must_fail with grep

2017-01-03 Thread Stefan Beller
On Sat, Dec 31, 2016 at 3:44 AM, Pranit Bauva wrote: > test_must_fail should only be used for testing git commands. To test the > failure of other commands use `!`. > > Reported-by: Stefan Beller > Signed-off-by: Pranit Bauva

Re: [PATCH] archive-zip: load userdiff config

2017-01-03 Thread René Scharfe
Am 02.01.2017 um 23:25 schrieb Jeff King: Since 4aff646d17 (archive-zip: mark text files in archives, 2015-03-05), the zip archiver will look at the userdiff driver to decide whether a file is text or binary. This usually doesn't need to look any further than the attributes themselves (e.g.,

[PATCH 1/2] stash: fix USAGE text

2017-01-03 Thread Marc Strapetz
Add missing usage description for stash subcommands 'create' and 'store'. Signed-off-by: Marc Strapetz --- git-stash.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/git-stash.sh b/git-stash.sh index 10c284d1a..c6b9db694 100755 ---

[PATCH 2/2] stash: --[no-]include-untracked option for create

2017-01-03 Thread Marc Strapetz
Expose internal option to include untracked files for the stash 'create' subcommand. Signed-off-by: Marc Strapetz --- Documentation/git-stash.txt | 2 +- git-stash.sh| 14 -- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v3 06/21] t1700: add tests for core.splitIndex

2017-01-03 Thread Junio C Hamano
Christian Couder writes: > Ok, I will add a patch to update the style of the existing tests at > the beginning of the series and then use the same new style in the > tests I add in later patches. That's not what I meant---I was expecting and was willing to accept a

Re: [RFC PATCH 0/5] Localise error headers

2017-01-03 Thread Duy Nguyen
On Mon, Jan 2, 2017 at 6:14 PM, Michael J Gruber wrote: > Currently, the headers "error: ", "warning: " etc. - generated by die(), > warning() etc. - are not localized, but we feed many localized error messages > into these functions so that we produce error messages

Re: What's cooking in git.git (Dec 2016, #08; Tue, 27)

2017-01-03 Thread Duy Nguyen
On Thu, Dec 29, 2016 at 5:06 PM, Duy Nguyen wrote: > On Thu, Dec 29, 2016 at 1:18 AM, Brandon Williams wrote: >> On 12/27, Junio C Hamano wrote: >>> * bw/pathspec-cleanup (2016-12-14) 16 commits >>> - pathspec: rename prefix_pathspec to init_pathspec_item

Re: [PATCH v3 08/16] pathspec: always show mnemonic and name in unsupported_magic

2017-01-03 Thread Duy Nguyen
On Wed, Dec 14, 2016 at 6:14 AM, Brandon Williams wrote: > @@ -340,8 +336,9 @@ static void NORETURN unsupported_magic(const char > *pattern, > continue; > if (sb.len) > strbuf_addch(, ' '); > - if

Re: [PATCH v3 06/16] pathspec: copy and free owned memory

2017-01-03 Thread Duy Nguyen
On Wed, Dec 14, 2016 at 6:14 AM, Brandon Williams wrote: > void clear_pathspec(struct pathspec *pathspec) > { > + int i; > + > + for (i = 0; i < pathspec->nr; i++) { > + free(pathspec->items[i].match); > +

Re: [PATCH v3 02/16] dir: remove struct path_simplify

2017-01-03 Thread Duy Nguyen
On Wed, Dec 14, 2016 at 6:14 AM, Brandon Williams wrote: > @@ -2010,14 +1987,11 @@ static struct untracked_cache_dir > *validate_untracked_cache(struct dir_struct *d > return root; > } > > -int read_directory(struct dir_struct *dir, const char *path, int len, const >