Re: [PATCHv2 2/5] submodule--helper clone: simplify path check

2016-03-31 Thread Eric Sunshine
On Thu, Mar 31, 2016 at 5:04 PM, Stefan Beller wrote: > submodule--helper clone: simplify path check I don't see anything in the patch which simplifies a path check. Instead, this version of the patch is now fixing a potential NULL-dereference. > The calling shell code makes sure that `path` is

[PATCHv2 2/5] submodule--helper clone: simplify path check

2016-03-31 Thread Stefan Beller
The calling shell code makes sure that `path` is non null and non empty. Side note: it cannot be null as just three lines before it is passed to safe_create_leading_directories_const which would crash as you feed it null. That means the `else` part is dead code, so remove it. To make the code futu