Re: [PATCH 1/2] refs/files: use correct error type when locking fails
From: Patrick Steinhardt <hidden>
Date: 2025-09-03 11:48:25
On Wed, Sep 03, 2025 at 03:38:04AM -0700, Karthik Nayak wrote:
Patrick Steinhardt [off-list ref] writes:quoted
On Tue, Sep 02, 2025 at 10:34:25AM +0200, Karthik Nayak wrote:quoted
diff --git a/builtin/fetch.c b/builtin/fetch.c index 24645c4653..9563abbe12 100644 --- a/builtin/fetch.c +++ b/builtin/fetch.c@@ -1657,11 +1658,25 @@ static void ref_transaction_rejection_handler(const char *refname, { struct ref_rejection_data *data = cb_data; - if (err == REF_TRANSACTION_ERROR_NAME_CONFLICT && !data->conflict_msg_shown) { + if (err == REF_TRANSACTION_ERROR_CREATE_EXISTS && ignore_case && + !data->case_sensitive_msg_shown) { + error(_("You're on a case-insensitive filesystem, and the remote you are\n" + "trying to fetch from has references that only differ in casing. It\n" + "is impossible to store such references with the 'files' backend. You\n" + "can either accept this as-is, in which case you won't be able to\n" + "store all remote references on disk. Or you can alternatively\n" + "migrate your repository to use the 'reftable' backend with the\n" + "following command:\n\n git refs migrate --ref-format=reftable\n\n" + "Please keep in mind that not all implementations of Git support this\n" + "new format yet. So if you use tools other than Git to access this\n" + "repository it may not be an option to migrate to reftables.\n"));This reads familiar :)Which I failed to attribute to you, sorry for missing that, will add in a 'Helped-by'.
No worries, I didn't mind it at all. Patrick