workflows.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Matthew Wilcox <willy@infradead.org>
Cc: "Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Dwaipayan Ray" <dwaipayanray1@gmail.com>,
	"Lukas Bulwahn" <lukas.bulwahn@gmail.com>,
	"Joe Perches" <joe@perches.com>,
	"Jonathan Corbet" <corbet@lwn.net>,
	"Thorsten Leemhuis" <linux@leemhuis.info>,
	"Andy Whitcroft" <apw@canonical.com>,
	"Niklas Söderlund" <niklas.soderlund@corigine.com>,
	"Simon Horman" <horms@kernel.org>,
	"Conor Dooley" <conor@kernel.org>,
	"Miguel Ojeda" <miguel.ojeda.sandonis@gmail.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	workflows@vger.kernel.org, linux-doc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/2] Increase minimum git commit ID abbreviation to 16 characters
Date: Sat, 14 Dec 2024 08:31:24 -0800	[thread overview]
Message-ID: <CAHk-=wgrc4zvZg+Sz_aLmMbaJ6ZHYaJBQ7nzByj2pMZBbh6www@mail.gmail.com> (raw)
In-Reply-To: <Z12sScjRHpB1d0nO@casper.infradead.org>

On Sat, 14 Dec 2024 at 08:03, Matthew Wilcox <willy@infradead.org> wrote:
>
> I have wondered about using a different encoding for the sha1.
> Classic Ascii85 encoding is no good; it uses characters like '"\<
> which interact poorly with every shell.  RFC1924 is somewhat better,
> but still uses characters that interact poorly with shell.

I suspect that the pain would much outweigh the gain. You'd need to
teach all tools about the new format, and you'd also need to add some
additional format specifying character just to make it unambiguous
*which* format you use, since if you just extend the character set
you'll have lots of hashes that could be either.

And you could disambiguate by testing both and seeing which one works
better, but at that point, you're much better off disambiguating the
current regular hex format by being a bit smarter about the objects.

Using base36 doesn't add enough bits to then make up for such a
disambiguation character in practice (ie 11 characters vs 12 - not
really noticeable).

base62 would be better, but christ does *that* really result in an
unreadable jumble. At that point I'd rather see 16-character hex than
the complete line noise that is base62.

Also, I bet people would start looking for shorthand formats that
spell rude words.  You are kind of limited with hex, and sometimes
that's an advantage.

                 Linus

  reply	other threads:[~2024-12-14 16:31 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-05 18:16 [PATCH v2 0/2] Align and increase git commit ID abbreviation guidelines and checks Geert Uytterhoeven
2024-12-05 18:16 ` [PATCH v2 1/2] Align " Geert Uytterhoeven
2024-12-30 18:43   ` Jonathan Corbet
2024-12-05 18:16 ` [PATCH v2 2/2] Increase minimum git commit ID abbreviation to 16 characters Geert Uytterhoeven
2024-12-05 19:19   ` Linus Torvalds
2024-12-13 19:41     ` Geert Uytterhoeven
2024-12-14 16:03     ` Matthew Wilcox
2024-12-14 16:31       ` Linus Torvalds [this message]
2024-12-18 23:36     ` [RFC] git-disambiguate: disambiguate shorthand git ids Sasha Levin
2024-12-19  1:41       ` Kees Cook
2024-12-19 20:35         ` Sasha Levin

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='CAHk-=wgrc4zvZg+Sz_aLmMbaJ6ZHYaJBQ7nzByj2pMZBbh6www@mail.gmail.com' \
    --to=torvalds@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=conor@kernel.org \
    --cc=corbet@lwn.net \
    --cc=dwaipayanray1@gmail.com \
    --cc=geert+renesas@glider.be \
    --cc=gitster@pobox.com \
    --cc=horms@kernel.org \
    --cc=joe@perches.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@leemhuis.info \
    --cc=lukas.bulwahn@gmail.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=niklas.soderlund@corigine.com \
    --cc=willy@infradead.org \
    --cc=workflows@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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