git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Taylor Blau <me@ttaylorr.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH/RFC] range-diff: make output format more useful for "rebase --onto"
Date: Fri, 17 Sep 2021 23:29:53 -0400	[thread overview]
Message-ID: <YUVdMVCuOTfg5zc3@nand.local> (raw)
In-Reply-To: <xmqqv92yg5y6.fsf@gitster.g>

On Fri, Sep 17, 2021 at 04:04:01PM -0700, Junio C Hamano wrote:
> In a range-diff output, we often see an early part of an updated
> series having no changes since the previous iteration.  After
> applying an updated patch submission to the same base as the
> previous round,
>
>     $ git range-diff master..topic@{1} master..topic
>
> to view the differences since the previous edition, we might see
> something like this:
>
> [...]

Hmm... looks familiar :).

> The updated output format looks like this instead:
>
>     1 = 1 a05f02b1d9 a05f02b1d9 : t/helper/test-bitmap.c: add  ...
>     2 = 2 8de300e1f7 8de300e1f7 : pack-bitmap.c: propagate nam ...
>     3 = 3 caca3c9f07 caca3c9f07 : midx.c: respect 'pack.writeB ...
>     4 = 4 2082224f17 2082224f17 : p5326: create missing 'perf- ...
>     5 = 5 97b89c8150 97b89c8150 : p5326: don't set core.multiP ...
>     6 < - a1dd4c97b9 ---------- : p5326: generate pack bitmaps ...
>     - > 6 ---------- bf4a60874a : p5326: generate pack bitmaps ...
>     7 ! 7 2b909ebad3 54156af0d6 : t5326: test propagating hash ...
> 	@@ t/t5326-multi-pack-bitmaps.sh: test_expect_success 'pack.preferBitmapTips' '
> 	 +	(
> 	 +		cd repo &&

I do not feel strongly about either format, and can understand an appeal
for both. I think that I find the existing format a little clearer to
read, but it's possible that I'm just biased since it's always been
that way.

But I can equally understand why it would be nicer to have both hashes
next to each other separated by whitespace.

I also don't care to make it configurable, or to work on more flexible
formatting options for range-diff. I would be fine with the proposed
format. As an alternative, something like this could work:

  perl -ale 'if (@F[2] ne "=") { print "$l $r"; exit }; $l = @F[1]; $r = @F[4]'

when piped the output of range-diff with --no-patch. That gives you
empty output when the two series aren't related, which may or may not be
what you want.

Thanks,
Taylor

  parent reply	other threads:[~2021-09-18  3:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-17 23:04 [PATCH/RFC] range-diff: make output format more useful for "rebase --onto" Junio C Hamano
2021-09-18  0:06 ` Eric Sunshine
2021-09-18  3:29 ` Taylor Blau [this message]
2021-09-18  7:29 ` Ævar Arnfjörð Bjarmason
2021-09-19  7:34   ` Ævar Arnfjörð Bjarmason
2021-09-19 21:22   ` 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=YUVdMVCuOTfg5zc3@nand.local \
    --to=me@ttaylorr.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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).