From: Eric Sunshine Date: Sun, 26 Jul 2020 23:30:22 GMT Subject: Re: [PATCH v4 29/39] http-fetch: set up git directory before parsing pack hashes Message-ID: In-Reply-To: On Sun, Jul 26, 2020 at 7:28 PM Eric Sunshine wrote: > This change has the unfortunate side-effect that "git http-fetch -h" > will no longer work if setup_git_directory() fails, which could easily > be the case if the user is trying to get help for the command from > some arbitrary location in the filesystem. > > It might be better to setup_git_directory() on-demand when it's needed > by --packfile= rather than doing it unconditionally before the > argument-parsing loop. Better yet, use setup_git_directory_gently() before entering the argument-parsing loop.