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

Re: [PATCH] Hash name is SHA-1

From
APAndy Parkins <andyparkins@gmail.com>
Date
Jan 26, 2007, 11:54 UTC
Message-ID
<200701261154.20723.andyparkins@gmail.com>
In-Reply-To
<7vr6ti659k.fsf@assigned-by-dhcp.cox.net>
On Thursday 2007 January 25 23:44, Junio C Hamano wrote:
> I do agree the original patch conflates many different things,
> and it would be nicer to do this clean-up as separate pieces.
FYI:

As you know I've got some patches that fix use of literal numbers for the hash sizes instead of SOME_CONSTANT. I've further got one that does the same for the literal uses of "refs/" et al. I'm holding off on these until after 1.5 so as to minimise big changes.

> * The official name of these 40-hexdigit thingy we use to name
>   objects is "object name" (see Documentation/glossary.txt).

As a further to the above cleanups, I'm also planning to fix all the sha1 named variables to be "hash" or "object" or something. It strikes me that this plan is related to this cleanup and might fix some of the issues like:

> +       "git-read-tree (<sha> | "
> +       "[[-m [--aggressive] | --reset | --prefix=<prefix>] "
> +       "[-u | -i]] [--exclude-per-directory=<gitignore>] "
> +       "<sha1> [<sha2> [<sha3>]])";

The reasons for wanting this are, I hope, obvious. The variables (and parameters) accept object-names not SHA-1 hashes. The fact that the objects are named after a SHA-1 isn't relevant to users; and shouldn't be relevant for the variable names, simply to promote abstraction from what the actual hash function is.

I mention it here because it seems to fit with this cleanup theme. Am I still correct that you would want this sort of thing post-1.5? Is it even a reasonable goal to have?

Andy
-- 
Dr Andy Parkins, M Eng (hons), MIEE
andyparkins@gmail.com
Previous: Junio C HamanoNext: Junio C Hamano
Message 9 of 11 in “Some cleanups”
  1. Horst H. von BrandJan 25, 2007
  2. Hash name is SHA-1Horst H. von Brand, Jan 25, 2007
  3. Shawn O. PearceJan 25, 2007
  4. Nicolas PitreJan 25, 2007
  5. Horst H. von BrandJan 25, 2007
  6. Shawn O. PearceJan 25, 2007
  7. Matthias LederhoferJan 25, 2007
  8. Junio C HamanoJan 25, 2007
  9. Andy ParkinsJan 26, 2007
  10. Junio C HamanoJan 26, 2007
  11. Jakub NarebskiJan 26, 2007

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.