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

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

From
RMRobin Moussu <robin.moussu@gmail.com>
Date
Apr 16, 2015, 10:14 UTC
Message-ID
<552F8B85.2000908@gmail.com>
I have a bug using the following command:
    git log --oneline --decorate --graph
In short, the first line of the log is often truncated.

If the terminal is too small to display all the text (~100 columns, and too much text to fit on the high of screen, in this example less than 4 lines), I actually see:

If my history is:
*   4656b73 (HEAD, long_branch_name_and_long_commit_name) Merge commit
'f7f6e4736ad040a1238644a33b681a66c79fac0e' into HEAD
|\
| * f7f6e47 (master) Praesent et diam eget libero egestas mattis sit
amet vitae augue.
| * 8dccb9d Maecenas congue ligula ac quam viverra nec consectetur ante
hendrerit.
|/
* f7724a2 Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec
a diam lectus.
If my screen is not high enough, I see:
1238644a33b681a66c79fac0e' into HEAD
|\ 
| * f7f6e47 (master) Praesent et diam eget libero egestas mattis sit
amet vitae augue.
| * 8dccb9d Maecenas congue ligula ac quam viverra nec consectetur ante
hendrerit.
# next message truncated, because the screen is too small
instead of:
*   4656b73 (HEAD, long_branch_name_and_long_commit_name) Merge commit
'f7f6e4736ad040a1238644a33b681a66c79fac0e' into HEAD
|\
| * f7f6e47 (master) Praesent et diam eget libero egestas mattis sit
amet vitae augue.
| * 8dccb9d Maecenas congue ligula ac quam viverra nec consectetur ante
hendrerit.
# next message truncated, because the screen is too small
As you can see, the first line is truncated.
If I use:
    git log --pretty=oneline --all --decorate --graph
instead of:
    git log --oneline --all --decorate --graph
the problem is the same (first line truncated).

I have see that bug using terminology or xterm, with bash (without .bashrc) or zsh (lots of things in my .zshrc), and my desktop environment is i3/archlinux/git version 2.3.5 It is not a recent regression (if it is, I've learn git one year ago).

# 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. -- Robin Moussu //

Next: Junio C Hamano
Message 1 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.