git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* BUG: git rebase shows different commit message
@ 2020-10-14 17:11 Eugen Konkov
  2020-10-14 17:55 ` Junio C Hamano
  0 siblings, 1 reply; 3+ messages in thread
From: Eugen Konkov @ 2020-10-14 17:11 UTC (permalink / raw)
  To: Git Mailing List

Hello Git,

How to reproduce: do commit message with leading space:

$git log --graph --decorate --pretty=oneline --abbrev-commit
* 093010ea (local/dev) Change column 'Label' => 'OPFG' and added column 'comment'
* 86221a47  Updated OpenAPI schema according to SCHEMA 193
* 6202eb08 Added opfg.html

$git rebase -i --autostash --rebase-merges 86221a47^
label onto

reset onto
pick 86221a47 Updated OpenAPI schema according to SCHEMA 193
pick 093010ea Change column 'Label' => 'OPFG' and added column 'comment'

Here commit message is shown without leading space.
I  think  that this is wrong. Because if space was shown then I reword
commit message

r 86221a47 Updated OpenAPI schema according to SCHEMA 193
pick 093010ea Change column 'Label' => 'OPFG' and added column 'comment'

but now I just do not see that I shold reword it =(

TODO: Display commit message as is

-- 
Best regards,
Eugen Konkov


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG: git rebase shows different commit message
  2020-10-14 17:11 BUG: git rebase shows different commit message Eugen Konkov
@ 2020-10-14 17:55 ` Junio C Hamano
  2020-10-15  7:36   ` Eugen Konkov
  0 siblings, 1 reply; 3+ messages in thread
From: Junio C Hamano @ 2020-10-14 17:55 UTC (permalink / raw)
  To: Eugen Konkov; +Cc: Git Mailing List

> $git log --graph --decorate --pretty=oneline --abbrev-commit
> * 093010ea (local/dev) Change column 'Label' => 'OPFG' and added column 'comment'
> * 86221a47  Updated OpenAPI schema according to SCHEMA 193
> * 6202eb08 Added opfg.html
>
> $git rebase -i --autostash --rebase-merges 86221a47^
> label onto
>
> reset onto
> pick 86221a47 Updated OpenAPI schema according to SCHEMA 193
> pick 093010ea Change column 'Label' => 'OPFG' and added column 'comment'
>
> Here commit message is shown without leading space.
> I  think  that this is wrong. Because if space was shown then I reword
> commit message
>
> r 86221a47 Updated OpenAPI schema according to SCHEMA 193
> pick 093010ea Change column 'Label' => 'OPFG' and added column 'comment'
>
> but now I just do not see that I shold reword it =(

These one-line titles are shown to help you identify the commit to futz with,
not to help you review them. After all, you see only titles here
without the body
of the log message [*1*].

Besides, if the "breakage" in the title were not just an extra
whitespace but some
control characters that take the terminal into an insane state, we
should sanitize
the title we'd show here for identification purposes, so "show the
title as-is" is not
a good idea to begin with.

So, NAK.

[Footnote]
*1* ... and if majority of your commits have a single-liner titles, I cannot
imagine how these logs can be useful to its consumers (i.e. those who
use "git show" after identifying an old commit that broke things using
"git bisect" or "git blame").

A leading whitespace in such a "git log" output would be the least of your
problems in such a history, I would have to say.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: BUG: git rebase shows different commit message
  2020-10-14 17:55 ` Junio C Hamano
@ 2020-10-15  7:36   ` Eugen Konkov
  0 siblings, 0 replies; 3+ messages in thread
From: Eugen Konkov @ 2020-10-15  7:36 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Git Mailing List

Hello Junio,

>>>These one-line titles are shown to help you identify the commit to futz with,
>>>not to help you review them.

It  would  be  better, if these one-line titles also help me to review them.

>>> but some control characters that take the terminal into an insane state, we
>>> should sanitize the title we'd show here for identification purposes,
I expect they are sanitized in **same way** as it done for `git log ...`

>>> so "show the title as-is" is not
So  it  would  be better if it was shown same as `git log ...` display them

and sorry, "as is" was bad word. I mean if in different places is used
same  formatting,  so  **result should be same**.
I do not expect that commit messages are differ

Thank you.

Wednesday, October 14, 2020, 8:55:45 PM, you wrote:

>> $git log --graph --decorate --pretty=oneline --abbrev-commit
>> * 093010ea (local/dev) Change column 'Label' => 'OPFG' and added column 'comment'
>> * 86221a47  Updated OpenAPI schema according to SCHEMA 193
>> * 6202eb08 Added opfg.html
>>
>> $git rebase -i --autostash --rebase-merges 86221a47^
>> label onto
>>
>> reset onto
>> pick 86221a47 Updated OpenAPI schema according to SCHEMA 193
>> pick 093010ea Change column 'Label' => 'OPFG' and added column 'comment'
>>
>> Here commit message is shown without leading space.
>> I  think  that this is wrong. Because if space was shown then I reword
>> commit message
>>
>> r 86221a47 Updated OpenAPI schema according to SCHEMA 193
>> pick 093010ea Change column 'Label' => 'OPFG' and added column 'comment'
>>
>> but now I just do not see that I shold reword it =(

> These one-line titles are shown to help you identify the commit to futz with,
> not to help you review them. After all, you see only titles here
> without the body
> of the log message [*1*].

> Besides, if the "breakage" in the title were not just an extra
> whitespace but some
> control characters that take the terminal into an insane state, we
> should sanitize
> the title we'd show here for identification purposes, so "show the
> title as-is" is not
> a good idea to begin with.

> So, NAK.

> [Footnote]
> *1* ... and if majority of your commits have a single-liner titles, I cannot
> imagine how these logs can be useful to its consumers (i.e. those who
> use "git show" after identifying an old commit that broke things using
> "git bisect" or "git blame").

> A leading whitespace in such a "git log" output would be the least of your
> problems in such a history, I would have to say.



-- 
Best regards,
Eugen Konkov


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-15  7:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-14 17:11 BUG: git rebase shows different commit message Eugen Konkov
2020-10-14 17:55 ` Junio C Hamano
2020-10-15  7:36   ` Eugen Konkov

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).