git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Phillip Wood <phillip.wood123@gmail.com>
Cc: Greg Hurrell <greg@hurrell.net>,
	git@vger.kernel.org,
	"Brian M. Carlson" <sandals@crustytoothpaste.net>
Subject: Re: git-checkout doesn't seem to respect config from include.path
Date: Mon, 07 Feb 2022 15:50:36 -0800	[thread overview]
Message-ID: <xmqqsfsufd83.fsf@gitster.g> (raw)
In-Reply-To: <bb0532ca-f718-15d1-7328-fd0e062eae06@gmail.com> (Phillip Wood's message of "Mon, 7 Feb 2022 14:01:26 +0000")

Phillip Wood <phillip.wood123@gmail.com> writes:

> I think that would be worthwhile, the warning is potentially confusing
> though if a bad value is followed by a good value then we will warn 
> about the bad value but use the good one.

I dunno.  That is exactly why the new message is crafted to convey:
"you have an entry with an unsupported value in your configuration
file, which you may want to inspect and possibly correct it; in the
meantime we've ignored that entry".  "ignored" is the key word.

If we say "we later found this good value so we'd use it", it may
become confusing, as we'd never issue such a notice for a
last-one-wins variable that do not use any unsupported values, but
we are not doing that, so I think there is no room for confusion.


>> Completely untested.  The first test that would be interesting to
>> run is how many tests this changes breaks to gauge how good test
>> coverage we have ;-)
>>   xdiff-interface.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>> diff --git c/xdiff-interface.c w/xdiff-interface.c
>> index 2e3a5a2943..523b04960a 100644
>> --- c/xdiff-interface.c
>> +++ w/xdiff-interface.c
>> @@ -322,8 +322,8 @@ int git_xmerge_config(const char *var, const char *value, void *cb)
>>   		 * git-completion.bash when you add new merge config
>>   		 */
>>   		else
>> -			die("unknown style '%s' given for '%s'",
>> -			    value, var);
>> +			warning("ignored unknown style '%s' given for '%s'",
>> +				value, var);
>>   		return 0;
>>   	}
>>   	return git_default_config(var, value, cb);

      reply	other threads:[~2022-02-08  1:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-02 16:04 git-checkout doesn't seem to respect config from include.path Greg Hurrell
2022-02-02 22:57 ` brian m. carlson
2022-02-03  7:48   ` Greg Hurrell
2022-02-03 15:54 ` Phillip Wood
2022-02-03 17:39   ` Greg Hurrell
2022-02-03 17:42     ` Greg Hurrell
2022-02-07 14:05     ` Phillip Wood
2022-02-03 18:07   ` Junio C Hamano
2022-02-07 14:01     ` Phillip Wood
2022-02-07 23:50       ` Junio C Hamano [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqsfsufd83.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=greg@hurrell.net \
    --cc=phillip.wood123@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).