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

gitweb/gitk: empty merge diffs

From
LWLea Wiemann <lewiemann@gmail.com>
Date
Jun 29, 2008, 15:57 UTC
Message-ID
<4867B105.7070208@gmail.com>

I'm trying to get the diff of a merge ("git diff master^1 master") with gitk and gitweb, but both of them only show empty diffs (you can try yourself using the test script below).

Gitk doesn't seem to allow me to view the merge diff at all.

Gitweb only shows "Trivial merge" in the commitdiff view. In the commit view, I can get the merge diff I want by clicking the "diff" link behind the first parent.

Why is this a "trivial merge", and what's the reason for gitweb not displaying the diff to the first parent in the commitdiff view? I'm kinda confused here.

===== Graph: =====
*   master      merge mybranch into master
|\
| * mybranch    change file2 on mybranch
| * mybranch~1  change file2 on mybranch
* | master~1    change file1 on master
* | master~2    change file1 on master
|/
* mybranch~2    initial commit
===== Script to set up the repository: =====

rm -rf test-repo.tmp mkdir test-repo.tmp cd test-repo.tmp

git init

echo File 1 > file1 echo File 2 > file2 git add file1 file2 git commit -m 'initial commit'

git branch mybranch

echo Addition to file 1 >> file1 git commit -a -m 'change file1 on master' echo Another addition to file 1 >> file1 git commit -a -m 'change file1 on master'

git checkout mybranch echo Addition to file 2 >> file2 git commit -a -m 'change file2 on mybranch' echo Another addition to file 2 >> file2 git commit -a -m 'change file2 on mybranch'

git checkout master git merge 'merge mybranch into master' HEAD mybranch

Next: Jakub Narebski
Message 1 of 2 in “gitweb/gitk: empty merge diffs”
  1. Lea WiemannJun 29, 2008
  2. Jakub NarebskiJun 29, 2008

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.