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

Re: [PATCH 1/1] Documentation/user-manual.txt: example for generating object hashes

From
Dirk Gouders <dirk@gouders.net>
Date
Mar 8, 2024, 22:11 UTC
Message-ID
<gho7bo1ihf.fsf@gouders.net>
In-Reply-To
<xmqqil1wiw5l.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
Show 34 quoted lines
> Dirk Gouders <dirk@gouders.net> writes:
>
>> May I ask what you meant by "modulo coding style", e.g. where I should
>> look at to make the code of similar style?
>
> Documentation/CodingGuidelines would be a good start, but
>
>  * A here-doc for a single liner is probably an overkill.  Why not
>
>     echo "Hello, world" >file
>
>    In either way, in our codebase a redirection operator '>' (or
>    '<') has one whitespace before it, and no whitespace after it
>    before the file.
>
>  * printf piped to "cat - file" whose output feeds another pipe
>    looked unusual.  More usual way novices write may be
>
>     { printf ... ; cat file; } | sha1sum
>
> were the two things I noticed.
>
>> I would also add that git-hash-object(1) could be used to verify the
>> result if you think that is OK.
>
> git hash-object can be used to replace that whole thing ;-)
>
>> In addition to a suggestion in another mail, the commit would
>> consist of substantial content you suggested and perhaps, you could tell
>> me how to express this; would a Helped-By be correct?
>
> I think many may prefer to downcase B in By, but if it is
> "substantial", probably.  I do not think I gave much in this
> discussion to become a substantial addition to the original, though.

Thank you for the explanation (some of which I should have found by myself).

I will send the prepared v2 when I solved my struggling with range-diffs; that concept is new to me and I have a slow brain -- if one at all.

Dirk
Previous: Junio C HamanoNext: Dirk Gouders
Message 8 of 10 in “Documentation/user-manual.txt: try to clarify on object hashes”
  1. 0/1 Documentation/user-manual.txt: try to clarify on object hashesDirk Gouders, Feb 29, 2024
  2. 1/1 Documentation/user-manual.txt: example for generating object hashesDirk Gouders, Feb 29, 2024
  3. Junio C HamanoFeb 29, 2024
  4. Dirk GoudersFeb 29, 2024
  5. Junio C HamanoFeb 29, 2024
  6. Dirk GoudersMar 8, 2024
  7. Junio C HamanoMar 8, 2024
  8. Dirk GoudersMar 8, 2024
  9. 0/1 Documentation/user-manual.txt: try to clarify on object hashesDirk Gouders, Mar 12, 2024
  10. 1/1 Documentation/user-manual.txt: example for generating object hashesDirk Gouders, Mar 12, 2024

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.