From: Alecs King <alecsk@gmail.com>
To: git <git@vger.kernel.org>
Subject: [PATCH] gitk - show newly created files
Date: Sat, 31 Dec 2005 16:14:03 +0800 [thread overview]
Message-ID: <20051231081403.GA4547@localhost> (raw)
When specifying a filename as an argument to gitk, ie.
$ gitk apply.c
gitk does not show the diff when the file newly created.
That 'newly created' commit is the last one gitk gets from
'git-rev-list' so gitk thinks it has no parent while it normally does
(except that the commit itself is the root commit).
This patch is to (try to) fix this problem.
P.S, is it good if gitk also has a '--root' option like git-whatchanged?
Signed-off-by: Alecs King <alecsk@gmail.com>
diff --git a/gitk b/gitk
index f12b3ce..688ee12 100755
--- a/gitk
+++ b/gitk
@@ -2288,10 +2288,10 @@ proc selectline {l isnew} {
$cflist delete 0 end
$cflist insert end "Comments"
- if {$nparents($id) == 1} {
- startdiff $id
- } elseif {$nparents($id) > 1} {
+ if {$nparents($id) > 1} {
mergediff $id
+ } else {
+ startdiff $id
}
}
--
Alecs King
reply other threads:[~2005-12-31 8:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20051231081403.GA4547@localhost \
--to=alecsk@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).