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

Re: git log missing last line of output

From
NKNeal Kreitzinger <neal@rsss.com>
Date
May 27, 2009, 17:17 UTC
Message-ID
<gvjsc9$f40$1@ger.gmane.org>
In-Reply-To
<4A1D5F70.4030101@drmicha.warpmail.net>

Here is a 'copy and paste' of a testcase scenario that I recreated/executed in response to your reply (with comments added):

***CREATE NEW PROJECT SOURCE*** $ mkdir tstcase1 $ cd tstcase1 $ vi file1 $ cat file1 test1 ***MAKE IT A GIT REPO*** $ git config --global user.name 'tstuser1' $ git config --global user.name 'tstuser1@tstuser.com' $ git config --list user.name=tstuser1 user.email=tstuser1@tstuser.com $ git init Initialized empty Git repository in .git/ $ git add . $ git status # On branch master # # Initial commit # # Changes to be committed: # (use "git rm --cached <file>..." to unstage) # # new file: file1 # ***INITIAL COMMIT*** $ git commit

initial commit
# Please enter the commit message for your changes.
# (Comment lines starting with '#' will not be included)
# On branch master
#
# Initial commit
#
# Changes to be committed:
#   (use "git rm --cached <file>..." to unstage)
#
#       new file: file1
#
~
~
~
~
~
~
~
~
~
~
~
".git/COMMIT_EDITMSG" 12L, 262C written
Created initial commit bee2e0f: initial commit
 1 files changed, 1 insertions(+), 0 deletions(-)
 create mode 100644 file1
***FIRST MODIFICATION TO REPO***
$ vi file1
$ cat file1
test1 mod1
$ git add file1
$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   file1
#
***FIRST COMMIT AFTER INITIAL COMMIT***
$ git commit
1st commit after initial commit
# Please enter the commit message for your changes.
# (Comment lines starting with '#' will not be included)
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   file1
#
~
~
~
~
~
~
~
~
~
~
~
~
~
~
".git/COMMIT_EDITMSG" 9L, 259C written
Created commit 9f9ed56: 1st commit after initial commit
 1 files changed, 1 insertions(+), 1 deletions(-)
***MODIFY THE REPO AGAIN FOR GOOD MEASURE***
$ vi file1
$ cat file1
test1 mod2
$ git add file1
$ git status
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   file1
#
***SECOND COMMIT AFTER INITIAL COMMIT***
$ git commit
2nd commit after initial commit
# Please enter the commit message for your changes.
# (Comment lines starting with '#' will not be included)
# On branch master
# Changes to be committed:
#   (use "git reset HEAD <file>..." to unstage)
#
#       modified:   file1
#
~
~
~
~
~
~
~
~
~
~
~
~
~
~
".git/COMMIT_EDITMSG" 9L, 259C written
Created commit 7317049: 2nd commit after initial commit
 1 files changed, 1 insertions(+), 1 deletions(-)
$ clear

***EXECUTE GIT LOG*** $ git log

commit 73170498d68a0011b37d7ee095bf88b8dcb6fbb5
Author: tstuser1 <tstuser1@tstuser.com>
Date:   Wed May 27 11:48:30 2009 -0500
    2nd commit after initial commit
commit 9f9ed5663d180caefd0bcaff4578fdb2c542bf17
Author: tstuser1 <tstuser1@tstuser.com>
Date:   Wed May 27 11:14:38 2009 -0500
    1st commit after initial commit
commit bee2e0fa066aaa9fed99c15c2ab58744a34fda48
Author: tstuser1 <tstuser1@tstuser.com>
Date:   Wed May 27 11:13:13 2009 -0500

$ ***NOTE THAT LAST LINE OF OUTPUT IS MISSING ABOVE (SHOULD BE THE TITLE LINE OF THE INITIAL COMMIT -- BUT ITS NOT THERE)*** $ clear ***GIT LOG LAST TWO COMMITS*** $ git log -2

commit 73170498d68a0011b37d7ee095bf88b8dcb6fbb5
Author: tstuser1 <tstuser1@tstuser.com>
Date:   Wed May 27 11:48:30 2009 -0500
    2nd commit after initial commit
commit 9f9ed5663d180caefd0bcaff4578fdb2c542bf17
Author: tstuser1 <tstuser1@tstuser.com>
Date:   Wed May 27 11:14:38 2009 -0500

$ ***NOTE THAT THE LAST LINE OF OUTPUT IS MISSING (SHOULD BE THE TITLE LINE OF THE 1ST COMMIT AFTER INITIAL COMMIT -- BUT ITS NOT THERE)*** $ clear ***GIT LOG LAST COMMIT*** $ git log -1

commit 73170498d68a0011b37d7ee095bf88b8dcb6fbb5
Author: tstuser1 <tstuser1@tstuser.com>
Date:   Wed May 27 11:48:30 2009 -0500

$ ***NOTE THAT LAST LINE OF OUTPUT IS MISSING (SHOULD BE THE TITLE LINE OF THE LAST COMMIT -- BUT ITS NOT THERE)***

Is this the kind of testcase that you are looking for?

v/r, Neal

"Michael J Gruber" <git@drmicha.warpmail.net> wrote in message news:4A1D5F70.4030101@drmicha.warpmail.net...

Show 24 quoted lines
> Neal Kreitzinger venit, vidit, dixit 27.05.2009 00:57:
>> Git log is not displaying the last line of output (for a plain "$ git 
>> log"
>> the last line of output should be the title line of the initial commit).
>
> It should be the last line of the commit message, which is the "title
> line" (subject) if and only if the message consists of the subject line
> only.
>
>> (I'm using git 1.5.5.6 on rhel 5.3.)  This missing last line also occurs
>> with "git log --since" in which the last line of output should be the 
>> title
>> line of the first commit after the specified date, but it is missing in 
>> this
>> scenario also.  I've searched the release notes for 1.5.6 thru 1.6.3.1 
>> and
>> did not find this mentioned.  Does this also happen in newer versions of 
>> git
>> after 1.5.5.6?
>
> I can't reproduce this with git 1.5.5.6 (vanilla, not rhel). Do you have
> a minimal reproducible test case?
>
> Michael 
Previous: Michael J GruberNext: Johannes Sixt
Message 3 of 7 in “git log missing last line of output”
  1. Neal KreitzingerMay 26, 2009
  2. Michael J GruberMay 27, 2009
  3. Neal KreitzingerMay 27, 2009
  4. Johannes SixtMay 27, 2009
  5. Neal KreitzingerMay 27, 2009
  6. Neal KreitzingerJun 1, 2009
  7. Brian GernhardtJun 1, 2009

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.