git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/6] object_id Part 3

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 22, 2016, 22:02 UTC
Message-ID
<20160422220253.839970-1-sandals@crustytoothpaste.net>

This is the third of a series of patches to convert instances of unsigned char[20] to struct object_id. The focus in this series was to convert test-match-trees, related functions, and some dependencies. struct name_entry was converted as part of these dependencies.

The riskiest part of this series is the conversion of struct name_entry. Compatibility with unconverted code requires dereferencing the new oid member, but there are at least some places where we explicitly check that it is not NULL. Most of these are protected by a check for a nonzero mode.

This series rebases onto next cleanly and is not likely to conflict with other topics in flight. My intention is to send smaller series more frequently, with the goal of avoiding or minimizing conflicts where possible.

Changes from v1:
* Remove dereference of object_id pointer in boolean context.
brian m. carlson (6):
  Introduce a get_oid function.
  test-match-trees: convert to use struct object_id
  match-trees: convert shift_tree and shift_tree_by to object_id
  Convert struct name_entry to use struct object_id.
  tree-walk: convert tree_entry_extract to struct object_id
  match-trees: convert several leaf functions to struct object_id
 builtin/grep.c         |  6 ++---
 builtin/merge-tree.c   | 18 +++++++--------
 builtin/pack-objects.c |  4 ++--
 builtin/reflog.c       |  4 ++--
 cache-tree.c           |  4 ++--
 cache.h                |  6 +++--
 fsck.c                 | 10 ++++-----
 http-push.c            |  4 ++--
 list-objects.c         |  6 ++---
 match-trees.c          | 60 +++++++++++++++++++++++++-------------------------
 merge-recursive.c      |  4 ++--
 notes.c                |  4 ++--
 revision.c             |  4 ++--
 sha1_name.c            |  9 ++++++++
 test-match-trees.c     | 14 ++++++------
 tree-diff.c            |  8 +++----
 tree-walk.c            | 16 +++++++-------
 tree-walk.h            |  8 +++----
 tree.c                 | 10 ++++-----
 unpack-trees.c         |  4 ++--
 walker.c               |  4 ++--
 21 files changed, 109 insertions(+), 98 deletions(-)
-- 
2.8.1.369.geae769a
Next: brian m. carlson
Message 1 of 7 in “object_id Part 3”
  1. 0/6 object_id Part 3brian m. carlson, Apr 22, 2016
  2. 1/6 Introduce a get_oid function.brian m. carlson, Apr 22, 2016
  3. 2/6 test-match-trees: convert to use struct object_idbrian m. carlson, Apr 22, 2016
  4. 3/6 match-trees: convert shift_tree and shift_tree_by to object_idbrian m. carlson, Apr 22, 2016
  5. 4/6 Convert struct name_entry to use struct object_id.brian m. carlson, Apr 22, 2016
  6. 5/6 tree-walk: convert tree_entry_extract to struct object_idbrian m. carlson, Apr 22, 2016
  7. 6/6 match-trees: convert several leaf functions to struct object_idbrian m. carlson, Apr 22, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.