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

Re: [bug] first line truncated with `git log --oneline --decorate --graph`

From
Junio C Hamano <gitster@pobox.com>
Date
Apr 16, 2015, 15:28 UTC
Message-ID
<xmqqwq1chz2s.fsf@gitster.dls.corp.google.com>
In-Reply-To
<552F8B85.2000908@gmail.com>
Robin Moussu <robin.moussu@gmail.com> writes:
Show 28 quoted lines
> I have a bug using the following command:
>
>     git log --oneline --decorate --graph
>
> In short, the first line of the log is often truncated.
> ...
> # How to reproduce
>
> Open a small terminal windows (4*100)
>
>     mkdir tmp
>     cd tmp
>     git init
>     git commit --allow-empty -m 'Lorem ipsum dolor sit amet, consectetur
> adipiscing elit. Donec a diam lectus.'
>     git checkout -b long_branch_name_and_long_commit_name
>     git commit --allow-empty -m 'Maecenas congue ligula ac quam viverra
> nec consectetur ante hendrerit.'
>     git commit --allow-empty -m 'Praesent et diam eget libero egestas
> mattis sit amet vitae augue.'
>     git checkout master
>     git merge --no-ff long_branch_name_and_long_commit_name -m 'merge
> with a long commit message'
>     git checkout long_branch_name_and_long_commit_name
>     git merge master
>     git log --oneline  --decorate --graph
>
> I hope it is clear. The English is not my mother tongue.
It is clear and it does not reproduce for me.  I see
--------
*   5eff3a3 (HEAD -> long_branch_name_and_long_commit_name, master) merge with a long commit message
|\  
| * 61e21f3 Praesent et diam eget libero egestas mattis sit amet vitae augue.
:
--------

which looks perfectly sensible (my terminal is a "screen" running on a Ubuntu machine, displaying to a SecureShell terminal on a Chromebook).

Can you try running that problematic "git log" with its standard output redirected to a file (i.e. "git log ... >output") and then run your pager in that wide-but-short terminal (i.e. "less output"), to see if the same problem is observed? And then run "cat output" in a taller terminal with the same width to see if it is the output from "git log" that is causing you the problem?

Previous: Robin MoussuNext: Johannes Schindelin
Message 2 of 10 in “[bug] first line truncated with `git log --oneline --decorate --graph`”
  1. Robin MoussuApr 16, 2015
  2. Junio C HamanoApr 16, 2015
  3. Johannes SchindelinApr 16, 2015
  4. David MillerApr 16, 2015
  5. git-owner, was Re: [bug] first line truncated with `git log --oneline --decorate --graph`Johannes Schindelin, Apr 16, 2015
  6. Jeff KingApr 16, 2015
  7. David MillerApr 16, 2015
  8. Johannes SchindelinApr 16, 2015
  9. Johannes SchindelinApr 17, 2015
  10. Robin MoussuApr 16, 2015

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.