git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexei Lozovsky <a.lozovsky@gmail.com>
To: Kirill Likhodedov <kirill.likhodedov@jetbrains.com>
Cc: git <git@vger.kernel.org>
Subject: Re: Remove help advice text from git editors for interactive rebase and reword
Date: Sun, 23 Jul 2017 15:42:18 +0300	[thread overview]
Message-ID: <CALhvvbbud3oTTyzErQVumgUcdSPCcfGV4D31c66-J7P-jneqbQ@mail.gmail.com> (raw)
In-Reply-To: <241D60E0-1687-4DD8-A18C-CF7310DBFAEB@jetbrains.com>

On 23 July 2017 at 13:03, Kirill Likhodedov wrote:
> Hello,
>
> is it possible to remove the helping text which appears at the bottom
> of the Git interactive rebase editor (the one with the list of
> instructions)

I believe currently there is not way to do it. The interactive rebase
is implemented in git-rebase--interactive.sh which always makes a call
to append_todo_help to append the help text to the todo list of commits.

> and the one which appears at the bottom of the commit editor (which
> appears on rewording a commit or squashing commits)?

This one too seems to be hardcoded in builtin/commit.c.

> I can parse and strip out the help pages (but it is not very reliable
> since the text may change in future)

I doubt the syntax of the interactive rebase todo list will ever change,
so you can reliably remove all lines that are empty or start with the
$(git config --get core.commentchar) or '#' if that's empty or 'auto'.

However, it's harder with the commit messages during --amend as the
comment character is not really fixed and can be dynamically selected
to not conflict with the characters used in the commit message if the
core.commentchar is set to 'auto'.

> However I suppose that experienced command line users could also
> benefit from such configuration, since this helping text is intended
> only for newbies and is more like a noise for advanced users.

Well, the text is appended to the todo list of commits, so not that it
gets too much in the way of editing the list by humans.

  reply	other threads:[~2017-07-23 12:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-23 10:03 Remove help advice text from git editors for interactive rebase and reword Kirill Likhodedov
2017-07-23 12:42 ` Alexei Lozovsky [this message]
2017-07-23 22:09 ` Junio C Hamano
2017-07-23 22:26   ` Kirill Likhodedov
2017-07-24 17:23     ` Jeff King
2017-07-24 18:47       ` SZEDER Gábor
2017-07-24 21:47         ` 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=CALhvvbbud3oTTyzErQVumgUcdSPCcfGV4D31c66-J7P-jneqbQ@mail.gmail.com \
    --to=a.lozovsky@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=kirill.likhodedov@jetbrains.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 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 NNTP newsgroup(s).