All of lore.kernel.org
 help / color / mirror / Atom feed
From: Robin Moussu <robin.moussu@gmail.com>
To: git@vger.kernel.org
Subject: [bug] first line truncated with `git log --oneline --decorate --graph`
Date: Thu, 16 Apr 2015 12:14:29 +0200	[thread overview]
Message-ID: <552F8B85.2000908@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2741 bytes --]

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
//


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

             reply	other threads:[~2015-04-16 10:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 10:14 Robin Moussu [this message]
2015-04-16 15:28 ` [bug] first line truncated with `git log --oneline --decorate --graph` Junio C Hamano
2015-04-16 15:42   ` Johannes Schindelin
2015-04-16 15:56     ` David Miller
2015-04-16 16:11       ` git-owner, was " Johannes Schindelin
2015-04-16 16:26         ` Jeff King
2015-04-16 16:31           ` David Miller
2015-04-16 17:06             ` Johannes Schindelin
2015-04-17  7:14               ` Johannes Schindelin
2015-04-16 16:54         ` Robin Moussu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=552F8B85.2000908@gmail.com \
    --to=robin.moussu@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.