git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Remove help advice text from git editors for interactive rebase and reword

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 23, 2017, 22:09 UTC
Message-ID
<xmqqshhmerf1.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<241D60E0-1687-4DD8-A18C-CF7310DBFAEB@jetbrains.com>
Kirill Likhodedov <kirill.likhodedov@jetbrains.com> writes:
> My motivation is the following: I'm improving the Git client
> inside of IntelliJ IDEA IDE and I would like to provide only the
> plain commit message text to the user (any hints can be shown
> separately, not inside the editor).

Who is running "git commit --amend" and "git rebase -i" in the workflow of a user of your tool? Is it the end user who types these commands to the shell command prompt, or does your tool formulate the command line and does an equivalent of system(3) to run it?

I am assuming that the answer is the latter in my response.
> If there is no way to do it now, do you think it makes sense to
> provide a configuration variable for this, e.g. to introduce more
> advice.* config variables in addition to existing ones?

Not at all interested, as that would mean your tool will tell its users to set such a configuration variable and their interactive use of Git outside your tool will behave differently from other people who use vanilla Git, and they will complain to us.

But I do not think adding a new command line option that only is passed by a tool like yours when it runs "git rebase -i" via system(3) equivalent would introduce such an issue, so that may be workable.

But stepping back a bit, as you said in the parentheses, your tool would need to grab these "hints" from Git, instead of having a separate hardcoded hints that will go stale while the underlying Git command improves, to be able to show them "separately". Which means to me that you would need to get the output Git would normally show to the end user and do your own splitting and parsing anyway. Which in turn would mean that a configuration or a command line option to squelch these, which would rob your tool the ability to read what Git would have told to your users, would be a bad idea and not a useful addition to the overall system. So...

Previous: Alexei LozovskyNext: Kirill Likhodedov
Message 3 of 7 in “Remove help advice text from git editors for interactive rebase and reword”
  1. Kirill LikhodedovJul 23, 2017
  2. Alexei LozovskyJul 23, 2017
  3. Junio C HamanoJul 23, 2017
  4. Kirill LikhodedovJul 23, 2017
  5. Jeff KingJul 24, 2017
  6. SZEDER GáborJul 24, 2017
  7. Junio C HamanoJul 24, 2017

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.