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

[PATCH 0/6] object_id Part 3

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Apr 17, 2016, 23:10 UTC
Message-ID
<1460934641-435791-1-git-send-email-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. These seem to be limited to empty entries in merge-tree.c, and it doesn't appear that we ever pass an empty entry to a function which might dereference it.

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.

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.0.rc3.226.g39d4020
Next: brian m. carlson
Message 1 of 10 in “object_id Part 3”
  1. 0/6 object_id Part 3brian m. carlson, Apr 17, 2016
  2. 1/6 Introduce a get_oid function.brian m. carlson, Apr 17, 2016
  3. 2/6 test-match-trees: convert to use struct object_idbrian m. carlson, Apr 17, 2016
  4. 3/6 match-trees: convert shift_tree and shift_tree_by to object_idbrian m. carlson, Apr 17, 2016
  5. 4/6 Convert struct name_entry to use struct object_id.brian m. carlson, Apr 17, 2016
  6. Junio C HamanoApr 19, 2016
  7. brian m. carlsonApr 19, 2016
  8. Junio C HamanoApr 20, 2016
  9. 5/6 tree-walk: convert tree_entry_extract to struct object_idbrian m. carlson, Apr 17, 2016
  10. 6/6 match-trees: convert several leaf functions to struct object_idbrian m. carlson, Apr 17, 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.