All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Mike Rappazzo <rappazzo@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: Suggestion: add author info to TODO list in git-rebase--interactive
Date: Fri, 05 Jun 2015 12:35:15 -0700	[thread overview]
Message-ID: <xmqq8ubyrlsc.fsf@gitster.dls.corp.google.com> (raw)
In-Reply-To: <CANoM8SWX+UVWdV-Aeqqn8DuMf74zUWx=rbEaz3ctNDwa_ZZbeg@mail.gmail.com> (Mike Rappazzo's message of "Fri, 5 Jun 2015 15:00:17 -0400")

Mike Rappazzo <rappazzo@gmail.com> writes:

> I find that If I am doing a rebase with the intention to squash or
> re-order commits, it is helpful to know the commit author.

There is not a fundamental reason why the remainder of the line
after the object name in the rebase insn sheet should not be
customizable, and I think your patch is a good first step to
identify where that customization should go.

But that is a customization issue, not changing the default and the
only format used.

> diff --git a/git-rebase--interactive.sh b/git-rebase--interactive.sh
> index dc3133f..ec44d41 100644
> --- a/git-rebase--interactive.sh
> +++ b/git-rebase--interactive.sh
> @@ -977,7 +977,7 @@ else
>         revisions=$onto...$orig_head
>         shortrevisions=$shorthead
>  fi
> -git rev-list $merges_option --pretty=oneline --reverse --left-right
> --topo-order \
> +git rev-list $merges_option --pretty="%m%h [%an] %x09%s" --reverse
> --left-right --topo-order \
>         $revisions ${restrict_revision+^$restrict_revision} | \
>         sed -n "s/^>//p" |
>  while read -r sha1 rest

This is nothing new, and it may not even be a problem, but why do we
use --left-right and then filter with sed?  Does this part of the
code predate --left-only, I wonder.  I'd probably write

	git log --format="%h	%s" --left-only .....

with today's Git, but perhaps I am missing something?

> The problem, as I see it is that the original '--pretty=oneline' only
> produces a single line of output (of course).  However, the changed
> version '--pretty="%m%h [%an] %x09%s"' produces multiple lines.

Shouldn't you be using tformat, not format, if you are doing a
oneline emulation?

  reply	other threads:[~2015-06-05 19:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-05 19:00 Suggestion: add author info to TODO list in git-rebase--interactive Mike Rappazzo
2015-06-05 19:35 ` Junio C Hamano [this message]
2015-06-05 19:39   ` Eric Sunshine
2015-06-06  1:00     ` Mike Rappazzo
2015-06-07  6:14       ` 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

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

  git send-email \
    --in-reply-to=xmqq8ubyrlsc.fsf@gitster.dls.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=rappazzo@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.