git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH v2 00/36] object_id part 12
@ 2018-02-25 21:11 brian m. carlson
  2018-02-25 21:11 ` [PATCH v2 01/36] bulk-checkin: convert index_bulk_checkin to struct object_id brian m. carlson
                   ` (35 more replies)
  0 siblings, 36 replies; 42+ messages in thread
From: brian m. carlson @ 2018-02-25 21:11 UTC (permalink / raw)
  To: git
  Cc: Nguyễn Thái Ngọc Duy, Patryk Obara, Jeff King,
	Eric Sunshine

This is the twelfth in a series of patches to convert various parts of
the code to struct object_id.

The primary changes here are to the sha1_file code, find_unique_abbrev,
and lookup_replace_object.  Due to the circular nature of converting the
latter, there are several places where we briefly insert temporaries to
allow a multi-patch conversion.

Also included is a constant for object header length allocation.  This
isn't strictly related to the series, but it makes for a nice cleanup of
hard-coded constants, which is good for maintainability.

This series further decreases the number of hard-coded constants in the
code.  After this series, there are only 172 instances of the constant
"20" in the code (for any purpose) and 98 instances of "40".

Changes from v1:
* Rebase onto master.

brian m. carlson (36):
  bulk-checkin: convert index_bulk_checkin to struct object_id
  builtin/write-tree: convert to struct object_id
  cache-tree: convert write_*_as_tree to object_id
  cache-tree: convert remnants to struct object_id
  resolve-undo: convert struct resolve_undo_info to object_id
  tree: convert read_tree_recursive to struct object_id
  ref-filter: convert grab_objectname to struct object_id
  strbuf: convert strbuf_add_unique_abbrev to use struct object_id
  wt-status: convert struct wt_status_state to object_id
  Convert find_unique_abbrev* to struct object_id
  http-walker: convert struct object_request to use struct object_id
  send-pack: convert remaining functions to struct object_id
  replace_object: convert struct replace_object to object_id
  builtin/mktag: convert to struct object_id
  archive: convert write_archive_entry_fn_t to object_id
  archive: convert sha1_file_to_archive to struct object_id
  builtin/index-pack: convert struct ref_delta_entry to object_id
  sha1_file: convert read_loose_object to use struct object_id
  sha1_file: convert check_sha1_signature to struct object_id
  streaming: convert open_istream to use struct object_id
  builtin/mktree: convert to struct object_id
  sha1_file: convert assert_sha1_type to object_id
  sha1_file: convert retry_bad_packed_offset to struct object_id
  packfile: convert unpack_entry to struct object_id
  Convert remaining callers of sha1_object_info_extended to object_id
  sha1_file: convert sha1_object_info* to object_id
  builtin/fmt-merge-msg: convert remaining code to object_id
  builtin/notes: convert static functions to object_id
  tree-walk: convert get_tree_entry_follow_symlinks internals to
    object_id
  streaming: convert istream internals to struct object_id
  tree-walk: convert tree entry functions to object_id
  sha1_file: convert read_object_with_reference to object_id
  sha1_file: convert read_sha1_file to struct object_id
  Convert lookup_replace_object to struct object_id
  sha1_file: introduce a constant for max header length
  convert: convert to struct object_id

 apply.c                  |   4 +-
 archive-tar.c            |  28 ++++----
 archive-zip.c            |  18 ++---
 archive.c                |  32 ++++-----
 archive.h                |  10 +--
 bisect.c                 |   3 +-
 blame.c                  |  18 +++--
 builtin/am.c             |   8 +--
 builtin/blame.c          |   2 +-
 builtin/branch.c         |   2 +-
 builtin/cat-file.c       |  30 +++++----
 builtin/checkout.c       |  12 ++--
 builtin/commit-tree.c    |   2 +-
 builtin/describe.c       |   4 +-
 builtin/difftool.c       |   2 +-
 builtin/fast-export.c    |   8 +--
 builtin/fetch.c          |  10 +--
 builtin/fmt-merge-msg.c  |   4 +-
 builtin/fsck.c           |   4 +-
 builtin/grep.c           |   6 +-
 builtin/index-pack.c     |  43 ++++++------
 builtin/log.c            |   8 +--
 builtin/ls-files.c       |   4 +-
 builtin/ls-tree.c        |   8 +--
 builtin/merge-tree.c     |   5 +-
 builtin/merge.c          |   8 +--
 builtin/mktag.c          |  20 +++---
 builtin/mktree.c         |  24 +++----
 builtin/name-rev.c       |   2 +-
 builtin/notes.c          |  14 ++--
 builtin/pack-objects.c   |  27 ++++----
 builtin/prune.c          |   2 +-
 builtin/receive-pack.c   |   8 +--
 builtin/reflog.c         |   2 +-
 builtin/replace.c        |  10 +--
 builtin/reset.c          |   2 +-
 builtin/rev-list.c       |   2 +-
 builtin/rev-parse.c      |   2 +-
 builtin/rm.c             |   2 +-
 builtin/show-branch.c    |   2 +-
 builtin/show-ref.c       |   4 +-
 builtin/tag.c            |  16 +++--
 builtin/unpack-file.c    |   2 +-
 builtin/unpack-objects.c |   4 +-
 builtin/update-index.c   |   2 +-
 builtin/verify-commit.c  |   2 +-
 builtin/worktree.c       |   4 +-
 builtin/write-tree.c     |   6 +-
 bulk-checkin.c           |  18 ++---
 bulk-checkin.h           |   2 +-
 bundle.c                 |   2 +-
 cache-tree.c             |  36 +++++-----
 cache-tree.h             |   4 +-
 cache.h                  |  42 ++++++------
 combine-diff.c           |   6 +-
 commit.c                 |   8 +--
 config.c                 |   2 +-
 convert.c                |  12 ++--
 convert.h                |   2 +-
 diff.c                   |   6 +-
 dir.c                    |   2 +-
 entry.c                  |   4 +-
 fast-import.c            |  31 ++++-----
 fsck.c                   |   2 +-
 grep.c                   |   2 +-
 http-push.c              |   2 +-
 http-walker.c            |  16 ++---
 line-log.c               |   3 +-
 list-objects-filter.c    |   2 +-
 log-tree.c               |  12 ++--
 mailmap.c                |   2 +-
 match-trees.c            |  10 +--
 merge-blobs.c            |   4 +-
 merge-recursive.c        |  20 +++---
 notes-cache.c            |   2 +-
 notes-merge.c            |   2 +-
 notes.c                  |  10 +--
 object.c                 |  12 ++--
 pack-bitmap-write.c      |   3 +-
 pack-check.c             |   4 +-
 packfile.c               |  30 ++++-----
 pretty.c                 |   8 +--
 reachable.c              |   2 +-
 read-cache.c             |   4 +-
 ref-filter.c             |  14 ++--
 refs.c                   |   2 +-
 remote-testsvn.c         |   4 +-
 remote.c                 |   2 +-
 replace_object.c         |  26 ++++----
 rerere.c                 |   4 +-
 resolve-undo.c           |   8 +--
 resolve-undo.h           |   2 +-
 send-pack.c              |  12 ++--
 sequencer.c              |   9 +--
 sha1_file.c              | 137 ++++++++++++++++++++-------------------
 sha1_name.c              |  31 +++++----
 strbuf.c                 |   4 +-
 strbuf.h                 |   8 ++-
 streaming.c              |  18 ++---
 streaming.h              |   2 +-
 submodule-config.c       |   2 +-
 submodule.c              |   6 +-
 tag.c                    |  10 +--
 transport.c              |   6 +-
 tree-walk.c              |  45 +++++++------
 tree-walk.h              |   2 +-
 tree.c                   |  16 ++---
 tree.h                   |   2 +-
 wt-status.c              |  20 +++---
 wt-status.h              |   6 +-
 xdiff-interface.c        |   2 +-
 111 files changed, 591 insertions(+), 580 deletions(-)


^ permalink raw reply	[flat|nested] 42+ messages in thread

end of thread, other threads:[~2018-02-28  9:39 UTC | newest]

Thread overview: 42+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-25 21:11 [PATCH v2 00/36] object_id part 12 brian m. carlson
2018-02-25 21:11 ` [PATCH v2 01/36] bulk-checkin: convert index_bulk_checkin to struct object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 02/36] builtin/write-tree: convert " brian m. carlson
2018-02-25 21:11 ` [PATCH v2 03/36] cache-tree: convert write_*_as_tree to object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 04/36] cache-tree: convert remnants to struct object_id brian m. carlson
2018-02-26 11:15   ` Duy Nguyen
2018-02-25 21:11 ` [PATCH v2 05/36] resolve-undo: convert struct resolve_undo_info to object_id brian m. carlson
2018-02-26 11:25   ` Duy Nguyen
2018-02-27  2:01     ` brian m. carlson
2018-02-28  9:38       ` Duy Nguyen
2018-02-25 21:11 ` [PATCH v2 06/36] tree: convert read_tree_recursive to struct object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 07/36] ref-filter: convert grab_objectname " brian m. carlson
2018-02-25 21:11 ` [PATCH v2 08/36] strbuf: convert strbuf_add_unique_abbrev to use " brian m. carlson
2018-02-25 21:11 ` [PATCH v2 09/36] wt-status: convert struct wt_status_state to object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 10/36] Convert find_unique_abbrev* to struct object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 11/36] http-walker: convert struct object_request to use " brian m. carlson
2018-02-25 21:11 ` [PATCH v2 12/36] send-pack: convert remaining functions to " brian m. carlson
2018-02-25 21:11 ` [PATCH v2 13/36] replace_object: convert struct replace_object to object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 14/36] builtin/mktag: convert to struct object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 15/36] archive: convert write_archive_entry_fn_t to object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 16/36] archive: convert sha1_file_to_archive to struct object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 17/36] builtin/index-pack: convert struct ref_delta_entry to object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 18/36] sha1_file: convert read_loose_object to use struct object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 19/36] sha1_file: convert check_sha1_signature to " brian m. carlson
2018-02-25 21:11 ` [PATCH v2 20/36] streaming: convert open_istream to use " brian m. carlson
2018-02-25 21:11 ` [PATCH v2 21/36] builtin/mktree: convert to " brian m. carlson
2018-02-25 21:11 ` [PATCH v2 22/36] sha1_file: convert assert_sha1_type to object_id brian m. carlson
2018-02-25 21:11 ` [PATCH v2 23/36] sha1_file: convert retry_bad_packed_offset to struct object_id brian m. carlson
2018-02-25 21:12 ` [PATCH v2 24/36] packfile: convert unpack_entry " brian m. carlson
2018-02-25 21:12 ` [PATCH v2 25/36] Convert remaining callers of sha1_object_info_extended to object_id brian m. carlson
2018-02-25 21:12 ` [PATCH v2 26/36] sha1_file: convert sha1_object_info* " brian m. carlson
2018-02-25 21:12 ` [PATCH v2 27/36] builtin/fmt-merge-msg: convert remaining code " brian m. carlson
2018-02-25 21:12 ` [PATCH v2 28/36] builtin/notes: convert static functions " brian m. carlson
2018-02-25 21:12 ` [PATCH v2 29/36] tree-walk: convert get_tree_entry_follow_symlinks internals " brian m. carlson
2018-02-25 21:12 ` [PATCH v2 30/36] streaming: convert istream internals to struct object_id brian m. carlson
2018-02-25 21:12 ` [PATCH v2 31/36] tree-walk: convert tree entry functions to object_id brian m. carlson
2018-02-25 21:12 ` [PATCH v2 32/36] sha1_file: convert read_object_with_reference " brian m. carlson
2018-02-25 21:12 ` [PATCH v2 33/36] sha1_file: convert read_sha1_file to struct object_id brian m. carlson
2018-02-25 21:12 ` [PATCH v2 34/36] Convert lookup_replace_object " brian m. carlson
2018-02-26 11:37   ` Duy Nguyen
2018-02-25 21:12 ` [PATCH v2 35/36] sha1_file: introduce a constant for max header length brian m. carlson
2018-02-25 21:12 ` [PATCH v2 36/36] convert: convert to struct object_id brian m. carlson

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).