git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Sixt <j.sixt@viscovery.net>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	git@vger.kernel.org
Subject: Re: What's cooking in git.git (Aug 2013, #06; Tue, 27)
Date: Wed, 28 Aug 2013 08:39:16 +0200	[thread overview]
Message-ID: <521D9B14.2070408@viscovery.net> (raw)
In-Reply-To: <20130827214808.GA26350@sigill.intra.peff.net>

Am 8/27/2013 23:48, schrieb Jeff King:
> The counterarguments I can see are:
> 
>   1. Who cares? If you want to know whether pack-objects will choke on
>      your huge config value, then run pack-objects.
> 
>   2. Such a check would involve knowing which type we use internally to
>      look at packSizeLimit, and that is utterly undocumented (and
>      subject to change; e.g., it seems kind of senseless that we have a
>      4G pack-size limit on 32-bit platforms, and we may want to fix
>      that).
> 
> So if you do not buy the argument that communicating git's internal
> range checks is useful, then we can simply say "--int is magically long
> on every platform, and you can use it for everything numeric". And
> implement it with int64_t. You may be able to read or write some values
> for certain keys that git will barf on internally, but that is git's
> problem.

I'm in the camp of these (counter) arguments.

When my shell script asks for 'git config --int 3g', I expect to be
returned a positive 10-digit. What would I care which type Git or any
other tool is using internally? I only care whether my shell can work with
numbers that large. Or the next tool that I feed the number to. But that's
my business, not Git's.

> The one thing it doesn't get you is that you can currently set unsigned
> values to "-1" in the config to have them treated as ULONG_MAX. This is
> undocumented and as far as I know not used by anyone.

And it better stays that way. Magic numbers should be encoded with magic
strings in the config file.

-- Hannes

  parent reply	other threads:[~2013-08-28  6:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-27 19:22 What's cooking in git.git (Aug 2013, #06; Tue, 27) Junio C Hamano
2013-08-27 20:51 ` Jeff King
2013-08-27 21:05   ` Junio C Hamano
2013-08-27 21:48     ` Jeff King
2013-08-27 22:32       ` Junio C Hamano
2013-08-28  6:39       ` Johannes Sixt [this message]
2013-08-27 21:25 ` Antoine Pelisse
2013-08-27 22:33   ` Junio C Hamano
2013-08-27 21:51 ` Junio C Hamano
2013-08-28  0:05 ` Kacper Kornet

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

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

  git send-email \
    --in-reply-to=521D9B14.2070408@viscovery.net \
    --to=j.sixt@viscovery.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=peff@peff.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.
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 NNTP newsgroup(s).