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
//
signature.asc
Description: OpenPGP digital signature