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

Re: [PATCH v4 09/12] Add several uses of get_object_hash.

From
Jeff King <peff@peff.net>
Date
Nov 20, 2015, 11:38 UTC
Message-ID
<20151120113830.GF11198@sigill.intra.peff.net>
In-Reply-To
<1447122150-672570-10-git-send-email-sandals@crustytoothpaste.net>
On Tue, Nov 10, 2015 at 02:22:27AM +0000, brian m. carlson wrote:
Show 12 quoted lines
> diff --git a/patch-ids.c b/patch-ids.c
> index bf81b923..83229a0d 100644
> --- a/patch-ids.c
> +++ b/patch-ids.c
> @@ -8,10 +8,10 @@ static int commit_patch_id(struct commit *commit, struct diff_options *options,
>  		    unsigned char *sha1)
>  {
>  	if (commit->parents)
> -		diff_tree_sha1(commit->parents->item->object.sha1,
> -		               commit->object.sha1, "", options);
> +		diff_tree_sha1(get_object_hash(commit->parents->item->object),
> +		               get_object_hash(commit->object), "", options);

I haven't looked carefully at this series yet, but while applying I noticed that git complained about whitespace here (long run of spaces which could be using tabs).

I've fixed it up for what I'm queuing, but you may want to do so locally, too.

-Peff
Previous: brian m. carlsonNext: brian m. carlson
Message 11 of 15 in “object_id part 2”
  1. 00/12 object_id part 2brian m. carlson, Nov 10, 2015
  2. 01/12 sha1_file: introduce has_object_file helper.brian m. carlson, Nov 10, 2015
  3. 02/12 Convert struct ref to use object_id.brian m. carlson, Nov 10, 2015
  4. 03/12 add_sought_entry_mem: convert to struct object_idbrian m. carlson, Nov 10, 2015
  5. 04/12 parse_fetch: convert to use struct object_idbrian m. carlson, Nov 10, 2015
  6. 05/12 get_remote_heads: convert to struct object_idbrian m. carlson, Nov 10, 2015
  7. 06/12 push_refs_with_export: convert to struct object_idbrian m. carlson, Nov 10, 2015
  8. 07/12 ref_newer: convert to use struct object_idbrian m. carlson, Nov 10, 2015
  9. 08/12 object: introduce get_object_hash macro.brian m. carlson, Nov 10, 2015
  10. 09/12 Add several uses of get_object_hash.brian m. carlson, Nov 10, 2015
  11. Jeff KingNov 20, 2015
  12. brian m. carlsonNov 20, 2015
  13. 10/12 Convert struct object to object_idbrian m. carlson, Nov 10, 2015
  14. 11/12 Remove get_object_hash.brian m. carlson, Nov 10, 2015
  15. 12/12 remote: convert functions to struct object_idbrian m. carlson, Nov 10, 2015

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.