All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lea Wiemann <lewiemann@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: gitweb/gitk: empty merge diffs
Date: Sun, 29 Jun 2008 17:57:57 +0200	[thread overview]
Message-ID: <4867B105.7070208@gmail.com> (raw)

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

             reply	other threads:[~2008-06-29 15:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-29 15:57 Lea Wiemann [this message]
2008-06-29 17:21 ` gitweb/gitk: empty merge diffs Jakub Narebski

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=4867B105.7070208@gmail.com \
    --to=lewiemann@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.