Subject: Re: [PATCH/RFC] range-diff: make output format more useful for "rebase --onto"

From: Junio C Hamano <[email-masked]>
Date: Sun, 19 Sep 2021 14:22:00 -0700

Ævar Arnfjörð Bjarmason <[email-masked]> writes:

> As for the proposed output, I'm a bit negative on it, so first, if we're
> trying to note that two commits are the same wouldn't it be much better
> to just omit the second SHA-1? I.e. consider this variation of your
> proposed output;
>
>      1 = 1 a05f02b1d9 a05102bfd9 : t/helper/test-bitmap.c: add  ...
>
> You might eyeball that for a while before discovering that I switched
> the "f" and "1" around, i.e. the SHA-1s look /almost/ the same. Isn't
> this better? (or we could use "++++++++++" to not overlead any meaning
> "----------" has):
>
>      1 = 1 a05f02b1d9 ---------- : t/helper/test-bitmap.c: add  ...

It will not serve my purpose at all.  Assuming that the first one
are the equivalent and the later ones are different, the point of
changing the format is to allow an easy cut-and-paste after "git
rebase --onto" to create:

    $ git rebase --onto a05f02b1d9 a05102bfd9

and it is useless to show dashes, as I do not think this would work:

    $ git rebase --onto a05f02b1d9 ----------

;-)