public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Toon Claes <toon@iotcl•com>
To: Karthik Nayak <karthik.188@gmail•com>, git@vger•kernel.org
Cc: Karthik Nayak <karthik.188@gmail•com>, ps@pks•im, gitster@pobox•com
Subject: Re: [PATCH v2 1/5] pack-write: pass hash_algo to `fixup_pack_header_footer()`
Date: Fri, 17 Jan 2025 17:38:15 +0100	[thread overview]
Message-ID: <87zfjpiefc.fsf@iotcl.com> (raw)
In-Reply-To: <20250117-kn-the-repo-cleanup-v2-1-a7fdc19688f5@gmail.com>

Karthik Nayak <karthik.188@gmail•com> writes:

> The `fixup_pack_header_footer()` function uses the global
> `the_hash_algo` variable to access the repository's hash function. To
> avoid global variable usage, pass the hash function from the layers
> above.

I'm probably being overly pedantic here, so feel free to ignore me. But
you say "pass the hash function", technically that's not correct, you're
passing down the struct that defines several properties of the hashing
algorithm. This includes the hash function, but also other properties
like the hex size. By using "pass the hash function" in the commit
messages (and not only this commit message) it sounds to me like you're
changing the type of the object that desribes the "hash algo". But
again, feel free to ignore this comment.

-- 
Toon

  reply	other threads:[~2025-01-17 16:38 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-16 11:35 [PATCH 0/5] pack-write: cleanup usage of global variables Karthik Nayak via B4 Relay
2025-01-16 11:35 ` [PATCH 1/5] pack-write: pass hash_algo to `fixup_pack_header_footer()` Karthik Nayak via B4 Relay
2025-01-16 19:35   ` Junio C Hamano
2025-01-16 11:35 ` [PATCH 2/5] pack-write: pass repository to `index_pack_lockfile()` Karthik Nayak via B4 Relay
2025-01-16 19:05   ` Junio C Hamano
2025-01-17  8:47     ` Karthik Nayak
2025-01-16 11:35 ` [PATCH 3/5] pack-write: pass hash_algo to `write_idx_file()` Karthik Nayak via B4 Relay
2025-01-16 13:24   ` Patrick Steinhardt
2025-01-17  8:56     ` Karthik Nayak
2025-01-16 19:12   ` Junio C Hamano
2025-01-17  8:58     ` Karthik Nayak
2025-01-16 11:35 ` [PATCH 4/5] pack-write: pass hash_algo to `write_rev_file()` Karthik Nayak via B4 Relay
2025-01-16 13:24   ` Patrick Steinhardt
2025-01-16 19:35   ` Junio C Hamano
2025-01-16 11:35 ` [PATCH 5/5] pack-write: pass hash_algo to `write_rev_*()` Karthik Nayak via B4 Relay
2025-01-17  9:20 ` [PATCH v2 0/5] pack-write: cleanup usage of global variables Karthik Nayak
2025-01-17  9:20   ` [PATCH v2 1/5] pack-write: pass hash_algo to `fixup_pack_header_footer()` Karthik Nayak
2025-01-17 16:38     ` Toon Claes [this message]
2025-01-17 18:06       ` Junio C Hamano
2025-01-19 11:07         ` Karthik Nayak
2025-01-17  9:20   ` [PATCH v2 2/5] pack-write: pass repository to `index_pack_lockfile()` Karthik Nayak
2025-01-17  9:20   ` [PATCH v2 3/5] pack-write: pass hash_algo to `write_idx_file()` Karthik Nayak
2025-01-17 16:40     ` Toon Claes
2025-01-19 11:10       ` Karthik Nayak
2025-01-17  9:20   ` [PATCH v2 4/5] pack-write: pass hash_algo to `write_rev_file()` Karthik Nayak
2025-01-17  9:20   ` [PATCH v2 5/5] pack-write: pass hash_algo to internal functions Karthik Nayak
2025-01-17  9:46     ` Patrick Steinhardt
2025-01-17  9:55       ` Karthik Nayak
2025-01-19 11:19   ` [PATCH v3 0/5] pack-write: cleanup usage of global variables Karthik Nayak
2025-01-19 11:19     ` [PATCH v3 1/5] pack-write: pass hash_algo to `fixup_pack_header_footer()` Karthik Nayak
2025-01-19 11:19     ` [PATCH v3 2/5] pack-write: pass repository to `index_pack_lockfile()` Karthik Nayak
2025-01-19 11:19     ` [PATCH v3 3/5] pack-write: pass hash_algo to `write_idx_file()` Karthik Nayak
2025-01-19 11:19     ` [PATCH v3 4/5] pack-write: pass hash_algo to `write_rev_file()` Karthik Nayak
2025-01-19 11:19     ` [PATCH v3 5/5] pack-write: pass hash_algo to internal functions Karthik Nayak
2025-01-24  5:46     ` [PATCH v3 0/5] pack-write: cleanup usage of global variables Patrick Steinhardt
2025-01-24 15:47       ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zfjpiefc.fsf@iotcl.com \
    --to=toon@iotcl$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=gitster@pobox$(echo .)com \
    --cc=karthik.188@gmail$(echo .)com \
    --cc=ps@pks$(echo .)im \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox