git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Edward Thomson <ethomson@edwardthomson.com>,
	"brian m . carlson" <sandals@crustytoothpaste.net>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	demerphq <demerphq@gmail.com>,
	Brandon Williams <bmwill@google.com>,
	Derrick Stolee <stolee@gmail.com>
Subject: Re: Questions about the hash function transition
Date: Tue, 28 Aug 2018 15:50:17 +0200	[thread overview]
Message-ID: <87h8jeeh2e.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <878t4xfaes.fsf@evledraar.gmail.com>


On Thu, Aug 23 2018, Ævar Arnfjörð Bjarmason wrote:

>> Transition plan
>> ---------------
>
> One thing that's not covered in this document at all, which I feel is
> missing, is how we're going to handle references to old commit IDs in
> commit messages, bug trackers etc. once we go through the whole
> migration process.
>
> I.e. are users who expect to be able to read old history and "git show
> <sha1 I found>" expected to maintain a repository that has a live
> sha1<->sha256 mapping forever, or could we be smarter about this and
> support some sort of marker in the repository saying "maintain the
> mapping up until this point".
>
> Then, along with some v2 protocol extension to transfer such a
> historical mapping (and perhaps a default user option to request it)
> we'd be guaranteed to be able to read old log messages and "git show"
> them, and servers could avoid breaking past URLs without maintaining the
> mapping going forward.
>
> One example of this on the server is that on GitLab (I don't know how
> GitHub does this) when you reference a commit from e.g a bug, a
> refs/keep-around/<sha1> is created, to make sure it doesn't get GC'd.
>
> Those sorts of hosting providers would like to not break *existing*
> links, without needing to forever maintain a bidirectional mapping.

Considering this a bit more, I think this would nicely fall under what I
suggested in
https://public-inbox.org/git/874ll3yd75.fsf@evledraar.gmail.com/

I.e. the interface that's now proposed / documented is fairly
inelastic. I.e.:

    [extensions]
        objectFormat = sha256
        compatObjectFormat = sha1

If we instead had something like clean/smudge filters:

    [extensions]
        objectFilter = sha256-to-sha1
        compatObjectFormat = sha1
    [objectFilter "sha256-to-sha1"]
        clean  = ...
        smudge = ...

We could apply arbitrary transformations on objects through filters
which would accept/return some simple format requesting them to
translate such-and-such objects, and would either return object
names/types under which to store them, or "nothing to do".

So we could also have filters that would munge the contents of objects
between local & remote (for e.g. this "use a public remote host for
storing an encrypted repo" that'll fsck on their end) use-case, but also
e.g. be able to pass arguments to the filters saying that only commits
older than so-and-so are to have a reverse mapping (for looking up old
commits), or just ones on some branch etc.

It wouldn't be any slower than the current proposal, since some subset
of it would be picked up and implemented in C directly via some fast
path, similar to the proposal that e.g. some encoding filters be
implemented as built-ins.

But by having it be more extendable it'll be easy to e.g. pass options,
or implement custom transformations.

We're still far away from reviewing patches to implement this, but in
anticipation of that I'd like to see what people think about
future-proofing this objectFilter syntax.

  parent reply	other threads:[~2018-08-28 13:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-23 14:02 Questions about the hash function transition Ævar Arnfjörð Bjarmason
2018-08-23 14:27 ` Junio C Hamano
2018-08-23 15:20   ` Ævar Arnfjörð Bjarmason
2018-08-23 16:13     ` Junio C Hamano
2018-08-24  1:40 ` brian m. carlson
2018-08-24  1:54   ` Jonathan Nieder
2018-08-24  4:47     ` brian m. carlson
2018-08-24  4:52       ` Jonathan Nieder
2018-08-24  1:47 ` Jonathan Nieder
2018-08-28 12:04   ` Johannes Schindelin
2018-08-28 12:49     ` Derrick Stolee
2018-08-28 17:12       ` Jonathan Nieder
2018-08-28 17:11     ` Jonathan Nieder
2018-08-29 13:09       ` Johannes Schindelin
2018-08-29 13:27         ` Derrick Stolee
2018-08-29 14:43           ` Derrick Stolee
2018-08-29  9:13   ` How is the ^{sha256} peel syntax supposed to work? Ævar Arnfjörð Bjarmason
2018-08-29 17:51     ` Stefan Beller
2018-08-29 17:59       ` Jonathan Nieder
2018-08-29 18:34         ` Stefan Beller
2018-08-29 18:41         ` Ævar Arnfjörð Bjarmason
2018-08-29 19:12           ` Jonathan Nieder
2018-08-29 19:37             ` Ævar Arnfjörð Bjarmason
2018-08-29 20:46               ` Jonathan Nieder
2018-08-29 23:45                 ` Jeff King
2018-08-29 20:53             ` Junio C Hamano
2018-08-29 21:01               ` Jonathan Nieder
2018-08-29 17:56     ` Jonathan Nieder
2018-08-24  2:51 ` Questions about the hash function transition Jonathan Nieder
2018-08-28 13:50 ` Ævar Arnfjörð Bjarmason [this message]
2018-08-28 14:15   ` Edward Thomson
2018-08-28 15:02     ` Ævar Arnfjörð Bjarmason
2018-08-28 15:45     ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=87h8jeeh2e.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bmwill@google.com \
    --cc=demerphq@gmail.com \
    --cc=ethomson@edwardthomson.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=sandals@crustytoothpaste.net \
    --cc=stolee@gmail.com \
    --cc=torvalds@linux-foundation.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.
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).