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

Re: [PATCH v2 0/8] object_id part 4

From
Johannes Sixt <j6t@kdbg.org>
Date
Jun 19, 2016, 08:50 UTC
Message-ID
<57665CC6.6070208@kdbg.org>
In-Reply-To
<20160618221407.1046188-1-sandals@crustytoothpaste.net>
Am 19.06.2016 um 00:13 schrieb brian m. carlson:
> * Adjust the Coccinelle patches to transform plain structs before
>    pointers to structs to avoid misconversions.  This addresses the issue
>    that Peff caught originally.

To avoid future mistakes, can you write down how "transform plain structs before pointers to structs" looks like? Is it a particular order of Coccinelle rules? Which part of the interdiff between the previous round and this round makes the difference?

On a tangent, I wondered recently, why we need oidcpy() and oidclr(). After all, in place of, e.g.,

	oidcpy(&pair->two->oid, &p->oid);
	oidclr(&one->oid);
we can write
	pair->two->oid = p->oid;
	one->oid = null_oid;

Is there a particular reason *not* to make this transition? I find the latter less cluttered with equal clarity.

-- Hannes
Previous: brian m. carlsonNext: Jeff King
Message 13 of 20 in “object_id part 4”
  1. 0/8 object_id part 4brian m. carlson, Jun 18, 2016
  2. 6/8 merge-recursive: convert struct merge_file_info to object_idbrian m. carlson, Jun 18, 2016
  3. 4/8 Rename struct diff_filespec's sha1_valid member.brian m. carlson, Jun 18, 2016
  4. 2/8 Apply object_id Coccinelle transformations.brian m. carlson, Jun 18, 2016
  5. Junio C HamanoJun 21, 2016
  6. 8/8 merge-recursive: convert merge_recursive_generic to object_idbrian m. carlson, Jun 18, 2016
  7. 7/8 merge-recursive: convert leaf functions to use struct object_idbrian m. carlson, Jun 18, 2016
  8. 5/8 merge-recursive: convert struct stage_data to use object_idbrian m. carlson, Jun 18, 2016
  9. 3/8 Convert struct diff_filespec to struct object_idbrian m. carlson, Jun 18, 2016
  10. Junio C HamanoJun 21, 2016
  11. brian m. carlsonJun 24, 2016
  12. 1/8 Add basic Coccinelle transforms.brian m. carlson, Jun 18, 2016
  13. Johannes SixtJun 19, 2016
  14. Jeff KingJun 19, 2016
  15. brian m. carlsonJun 19, 2016
  16. Johannes SchindelinJun 20, 2016
  17. Jeff KingJun 20, 2016
  18. Junio C HamanoJun 20, 2016
  19. Junio C HamanoJun 21, 2016
  20. brian m. carlsonJun 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.