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

Bug in "git log --graph -p -m" (version 1.7.7.6)

From
Dale R. Worley <worley@alum.mit.edu>
Date
Feb 5, 2013, 17:00 UTC
Message-ID
<201302051700.r15H0GXx031004@freeze.ariadne.com>

I have found a situation where "git log" produces (apparently) endless output. Presumably this is a bug. Following is a (Linux) script that reliably reproduces the error for me (on Fedora 16):

---------- set -ve

# Print the git version. git --version

# Create respository. rm -rf .git git init

# Initial commit. ( echo 1 ; echo 2 ; echo 3 ) >file git add file git commit -m 'Commit P' git branch B HEAD

# Next commit on master adds line "1a". ( echo 1 ; echo 1a ; echo 2 ; echo 3 ) >file git add file git commit -m 'Commit Q'

git checkout B

# Next commit on B adds line "2a". ( echo 1 ; echo 2 ; echo 2a ; echo 3 ) >file git add file git commit -m 'Commit R'

# Merge the two commits, but add line "3a" to the commit as well. git checkout master git merge --no-commit B # Show what the merge produces. cat file # Add line "3a". ( echo 1 ; echo 1a ; echo 2 ; echo 2a ; echo 3 ; echo 3a ) >file git commit -m 'Commit S'

# These log commands work. git log git log --graph git log --graph -p

# This log command produces infinite output. git log --graph -p -m ----------

Dale
Next: Junio C Hamano
Message 1 of 9 in “Bug in "git log --graph -p -m" (version 1.7.7.6)”
  1. Dale R. WorleyFeb 5, 2013
  2. Junio C HamanoFeb 5, 2013
  3. Matthieu MoyFeb 5, 2013
  4. Dale R. WorleyFeb 6, 2013
  5. John KeepingFeb 6, 2013
  6. Matthieu MoyFeb 6, 2013
  7. graph: output padding for merge subsequent parentsJohn Keeping, Feb 6, 2013
  8. Matthieu MoyFeb 8, 2013
  9. Junio C HamanoFeb 8, 2013

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.