All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: "erik elfström" <erik.elfstrom@gmail.com>
Cc: Git List <git@vger.kernel.org>
Subject: Re: [PATCH v7 2/5] setup: sanity check file size in read_gitfile_gently
Date: Sun, 14 Jun 2015 23:08:44 -0400	[thread overview]
Message-ID: <CAPig+cRouQOgd29qQZSUo0t+NBPfeKWD+4j42pArLW3TpND=bQ@mail.gmail.com> (raw)
In-Reply-To: <CAMpP7NZ2tqZ5cv=9=gJqDZ5m0LOZtsHGvt-ntZcp6cBA6X5tqg@mail.gmail.com>

On Sun, Jun 14, 2015 at 1:21 PM, erik elfström <erik.elfstrom@gmail.com> wrote:
> On Sun, Jun 14, 2015 at 5:42 AM, Eric Sunshine <sunshine@sunshineco.com> wrote:
>>
>> This variable name doesn't convey much about its purpose, and
>> introduces a bit of maintenance burden if the limit is some day
>> changed. Perhaps "sane_size_limit" or something even more descriptive
>> (and/or terse) would be better.
>
> Would you be happy with this change?
>
> -       static const int one_MB = 1 << 20;
> +       static const int max_file_size = 1 << 20;  /* 1MB */

Yep, that's a much nicer variable name. Thanks.

I also note that 'const int' shows up pretty frequently in the git
source code, but 'static const int' is used only very rarely.

  reply	other threads:[~2015-06-15  3:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 18:24 [PATCH v7 0/5] Improving performance of git clean Erik Elfström
2015-06-09 18:24 ` [PATCH v7 1/5] setup: add gentle version of read_gitfile Erik Elfström
2015-06-09 18:24 ` [PATCH v7 2/5] setup: sanity check file size in read_gitfile_gently Erik Elfström
2015-06-14  3:42   ` Eric Sunshine
2015-06-14 17:21     ` erik elfström
2015-06-15  3:08       ` Eric Sunshine [this message]
2015-06-09 18:24 ` [PATCH v7 3/5] t7300: add tests to document behavior of clean and nested git Erik Elfström
2015-06-09 18:24 ` [PATCH v7 4/5] p7300: add performance tests for clean Erik Elfström
2015-06-09 18:24 ` [PATCH v7 5/5] clean: improve performance when removing lots of directories Erik Elfström

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='CAPig+cRouQOgd29qQZSUo0t+NBPfeKWD+4j42pArLW3TpND=bQ@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=erik.elfstrom@gmail.com \
    --cc=git@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.