git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [RFC] - url-safe base64 commit-id's
@ 2017-02-28  2:27 G. Sylvie Davies
  2017-02-28  6:30 ` Bryan Turner
  0 siblings, 1 reply; 2+ messages in thread
From: G. Sylvie Davies @ 2017-02-28  2:27 UTC (permalink / raw)
  To: Git Users

Is there any appetite for base64'd commit-id's, using the url-safe
variant (e.g. RFC 4648 [1] with padding removed)?

And so this:
712bad335dfa9c410a83f9873614a19726acb3a8

Becomes this:
cSutM136nEEKg_mHNhShlyass6g


Under the hood things cannot change (e.g., ".git/objects/71/") because
file systems are not always case sensitive.

But for "git log" and "git show" output it would be nice. And helps
with ambiguous commit id's too if you only want to specify a 7
character commit-id, since that encodes 42 bits instead of 28 bits.
I've run into problems with maximum command length on windows (32767
chars) because I was specifying so many commit-ids on the command-line
that I blew past that limit. This would help there, too.

Might be particularly helpful with the transition to a new hash.
e.g., a 43 character Base64 id instead of a 64 character hex id.


- Sylvie

[1] - https://tools.ietf.org/html/rfc4648#page-7

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFC] - url-safe base64 commit-id's
  2017-02-28  2:27 [RFC] - url-safe base64 commit-id's G. Sylvie Davies
@ 2017-02-28  6:30 ` Bryan Turner
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan Turner @ 2017-02-28  6:30 UTC (permalink / raw)
  Cc: Git Users

On Mon, Feb 27, 2017 at 6:27 PM, G. Sylvie Davies
<sylvie@bit-booster.com> wrote:
> Is there any appetite for base64'd commit-id's, using the url-safe
> variant (e.g. RFC 4648 [1] with padding removed)?
>
> And so this:
> 712bad335dfa9c410a83f9873614a19726acb3a8
>
> Becomes this:
> cSutM136nEEKg_mHNhShlyass6g
>
>
> Under the hood things cannot change (e.g., ".git/objects/71/") because
> file systems are not always case sensitive.
>
> But for "git log" and "git show" output it would be nice. And helps
> with ambiguous commit id's too if you only want to specify a 7
> character commit-id, since that encodes 42 bits instead of 28 bits.
> I've run into problems with maximum command length on windows (32767
> chars) because I was specifying so many commit-ids on the command-line
> that I blew past that limit. This would help there, too.

Depending on the command, have you considered using stdin instead? git log,
for example, is perfectly happy to read commit IDs from stdin instead of
the command line.

In general, I think the pattern of getting away from command line arguments
is better than trying to shoehorn more data into the same character limit.
Base64 encoding might help get a few more arguments into the available
limit, but in the end it's not going to solve the underlying problem.

>
> Might be particularly helpful with the transition to a new hash.
> e.g., a 43 character Base64 id instead of a 64 character hex id.
>
>
> - Sylvie
>
> [1] - https://tools.ietf.org/html/rfc4648#page-7

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-28  7:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28  2:27 [RFC] - url-safe base64 commit-id's G. Sylvie Davies
2017-02-28  6:30 ` Bryan Turner

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).