Re: [PATCH 07/15] remote.c: report error on failure to fopen()
From: Johannes Sixt <hidden>
Date: 2017-04-27 17:49:47
Am 27.04.2017 um 11:14 schrieb Duy Nguyen:
On Thu, Apr 27, 2017 at 12:07 PM, Johannes Sixt [off-list ref] wrote:quoted
Am 27.04.2017 um 02:57 schrieb Junio C Hamano:quoted
Johannes Sixt [off-list ref] writes:quoted
+++ git ls-remote 'refs*master' +warning: unable to access '.git/branches/refs*master': Invalid argument fatal: 'refs*master' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. +++ exit_code=128On Windows, it is not allowed to pass a file name with an asterisk to the OS. The test case contains this comment: # We could just as easily have used "master"; the "*" emphasizes its # role as a pattern. So, can we replace the name with a simple "master", our would this miss the goal of the test case? Should we make it conditional on the MINGW prerequisite?
OK I'll just add MINGW to the test then. Windows folks can improve warn_on_inaccessible() to suppress certain class of error messages if needed.
I actually meant something like this: if test_have_prereq MINGW then does_not_exist=master else does_not_exist="refs*master" fi test_must_fail git ls-remote "$does_not_exist" >actual 2>&1 && -- Hannes