* [PATCH] gitk - show newly created files
@ 2005-12-31 8:14 Alecs King
0 siblings, 0 replies; only message in thread
From: Alecs King @ 2005-12-31 8:14 UTC (permalink / raw)
To: git
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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2005-12-31 8:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-31 8:14 [PATCH] gitk - show newly created files Alecs King
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).