git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Chris Packham <judge.packham@gmail.com>
To: Stefan Zager <szager@google.com>, git@vger.kernel.org
Subject: Re: [PATCH] Make the global packed_git variable static to sha1_file.c.
Date: Wed, 12 Feb 2014 20:29:55 +1300	[thread overview]
Message-ID: <52FB22F3.8070100@gmail.com> (raw)
In-Reply-To: <20140212015727.1D63A403D3@wince.sfo.corp.google.com>

Hi,

On 12/02/14 14:57, Stefan Zager wrote:
> From b4796d9d99c03b0b7cddd50808a41413e45f1129 Mon Sep 17 00:00:00 2001
> From: Stefan Zager <szager@chromium.org>
> Date: Mon, 10 Feb 2014 16:55:12 -0800
> Subject: [PATCH] Make the global packed_git variable static to sha1_file.c.
> 
> This is a first step in making the codebase thread-safe.  By and
> large, the operations which might benefit from threading are those
> that work with pack files (e.g., checkout, blame), so the focus of
> this patch is stop leaking the global list of pack files outside of
> sha1_file.c.
> 
> The next step will be to control access to the list of pack files
> with a mutex.  However, that alone is not enough to make pack file
> access thread safe.  Even in a read-only operation, the window list
> associated with each pack file will need to be controlled.
> Additionally, the global counters in sha1_file.c will need to be
> controlled.
> 
> This patch is a pure refactor with no functional changes, so it
> shouldn't require any additional tests.  Adding the actual locks
> will be a functional change, and will require additional tests.
> 
> Signed-off-by: Stefan Zager <szager@chromium.org>
> ---
>  builtin/count-objects.c  |  44 ++++++-----
>  builtin/fsck.c           |  46 +++++++-----
>  builtin/gc.c             |  26 +++----
>  builtin/pack-objects.c   | 188 ++++++++++++++++++++++++++++-------------------
>  builtin/pack-redundant.c |  37 +++++++---
>  cache.h                  |  16 +++-
>  fast-import.c            |   4 +-
>  http-backend.c           |  28 ++++---
>  http-push.c              |   4 +-
>  http-walker.c            |   2 +-
>  pack-revindex.c          |  20 ++---
>  server-info.c            |  35 +++++----
>  sha1_file.c              |  35 ++++++++-
>  sha1_name.c              |  18 ++++-
>  14 files changed, 315 insertions(+), 188 deletions(-)

I'm not really qualified to comment on substance but there are some
basic style issues w.r.t. whitespace namely using 4 spaces for indent
and mixing tabs/spaces. This might seem pedantic for the first round of
a patch but it does put off reviewers.

>From Documentation/CodingGuidelines:

 - We use tabs to indent, and interpret tabs as taking up to
   8 spaces.

  reply	other threads:[~2014-02-12  7:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-12  1:57 [PATCH] Make the global packed_git variable static to sha1_file.c Stefan Zager
2014-02-12  7:29 ` Chris Packham [this message]
2014-02-12 18:26   ` Stefan Zager
2014-02-12 18:53     ` David Kastrup
2014-02-12 19:28     ` Junio C Hamano
  -- strict thread matches above, loose matches on Subject: below --
2014-02-13 23:09 szager

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=52FB22F3.8070100@gmail.com \
    --to=judge.packham@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=szager@google.com \
    /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).