git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tay Ray Chuan <rctay89@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: [PATCH 00/11] http*: refactor fetching code
Date: Sat, 16 May 2009 11:50:42 +0800	[thread overview]
Message-ID: <20090516115042.b77829fb.rctay89@gmail.com> (raw)

This patch series moves out fetching code from http-push.c and
http-walker.c into http.c to reduce code duplicity, and does not
attempt to change git's behaviour.

Patch #1 adds rigour to http fetch tests by testing fetching of packed
objects, in an effort to ensure that this patch series does not break
functionality or change behaviour.

Patch #2 introduces some style fixes, to reduce the number of trivial
differences between http-push.c and http-walker.c.

Patch #3 and #5 add features and fixes that were applied on to fetching
code in http-push.c or http-walker.c, but not the other. Patch #4, like
patch #3, applies onto the code for fetching pack indices (pack-*.idx),
and fixes the issue of "mutating" value of the hex variable in
fetch_index (especially likely to be encountered when using
http-walker.c).

Patch #6 does some simple refactoring of variables and macros.

Patch #7 refactors the logic for appending slashes in quote_ref_url,
creating a new method, end_url_with_slash. The latter method will be
used in the following patches, since the base urls in http-walker.c and
http-push.c are handled differently (ie. the former doesn't include a
trailing slash, while the latter does). By using this method
throughout, fetching code need not use different printf formatters or
differentiate between invocations from http-push.c and http-walker.c.

Patch #8 to #11 refactors code that handles fetching of:
 *pack indices (pack-*.idx)
 *packs
 *pack index (objects/info/packs)
 *loose objects

Tay Ray Chuan (11):
  t5550-http-fetch: test fetching of packed objects
  http-push, http-walker: style fixes
  http-walker: verify remote packs
  http*: copy string returned by sha1_to_hex
  http-push: do not SEGV after fetching a bad pack idx file
  http*: move common variables and macros to http.[ch]
  http: create function end_url_with_slash
  http*: add fetch_http_pack_index
  http*: add helper methods for fetching packs
  http*: add helper methods for fetching objects/info/packs
  http*: add helper methods for fetching objects (loose)

 http-push.c           |  472 +++++-------------------------------------
 http-walker.c         |  525 +++++++++-------------------------------------
 http.c                |  554 ++++++++++++++++++++++++++++++++++++++++++++++++-
 http.h                |   73 +++++++
 t/t5550-http-fetch.sh |    8 +
 5 files changed, 779 insertions(+), 853 deletions(-)

                 reply	other threads:[~2009-05-16  3:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090516115042.b77829fb.rctay89@gmail.com \
    --to=rctay89@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 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).