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

Re: [PATCH 0/7] fix inconsistent uses of the_repo in parse_object()'s call chain

From
Junio C Hamano <gitster@pobox.com>
Date
Jan 30, 2020, 21:26 UTC
Message-ID
<xmqqmua4bpqt.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<cover.1580413221.git.matheus.bernardino@usp.br>
Matheus Tavares <matheus.bernardino@usp.br> writes:
Show 7 quoted lines
> Note: I also tried to replace some uses of the_hash_algo with the struct
> git_hash_algo from the received repository, for consitency. (In
> practice, I'm not sure if this is very useful right now, but maybe it
> will be relevant for the change to SHA256?) Still, many functions in
> parse_object()'s call chain call oid_to_hex(), which uses the_hash_algo.
> Since changing this would require a much bigger operation, I decided to
> leave it as is, for now.

Passing a repo instance throughout the callchain and redusing the use of the_repo would be a worthwhile longer term clean-up.

Moving off of the_hash_algo to repo->hash_algo is, too, and it is very much relevant to the "newhash" work Brian (CCed) has been working on. You two do not want to step on each other's toes. Please coordinate.

Thanks.
Previous: Matheus TavaresNext: brian m. carlson
Message 12 of 16 in “fix inconsistent uses of the_repo in parse_object()'s call chain”
  1. 0/7 fix inconsistent uses of the_repo in parse_object()'s call chainMatheus Tavares, Jan 30, 2020
  2. 1/7 diff: make diff_populate_filespec() honor its repo argumentMatheus Tavares, Jan 30, 2020
  3. 2/7 cache-tree: use given repo's hash_algo at verify_one()Matheus Tavares, Jan 30, 2020
  4. 3/7 pack-check: use given repo's hash_algo at verify_packfile()Matheus Tavares, Jan 30, 2020
  5. 4/7 streaming: allow open_istream() to handle any repoMatheus Tavares, Jan 30, 2020
  6. Junio C HamanoJan 31, 2020
  7. 5/7 sha1-file: pass git_hash_algo to write_object_file_prepare()Matheus Tavares, Jan 30, 2020
  8. Torsten BögershausenFeb 1, 2020
  9. Jeff KingFeb 1, 2020
  10. 6/7 sha1-file: pass git_hash_algo to hash_object_file()Matheus Tavares, Jan 30, 2020
  11. 7/7 sha1-file: allow check_object_signature() to handle any repoMatheus Tavares, Jan 30, 2020
  12. Junio C HamanoJan 30, 2020
  13. brian m. carlsonJan 30, 2020
  14. Jeff KingJan 31, 2020
  15. Matheus Tavares BernardinoFeb 1, 2020
  16. Jeff KingFeb 1, 2020

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.