* gitk-1.0 released
@ 2005-05-19 13:05 Paul Mackerras
2005-05-19 13:24 ` Ingo Molnar
` (3 more replies)
0 siblings, 4 replies; 14+ messages in thread
From: Paul Mackerras @ 2005-05-19 13:05 UTC (permalink / raw)
To: git
I have released a new version of gitk. I got brave and called it 1.0
and it is at:
http://ozlabs.org/~paulus/gitk-1.0
(that's the actual script itself).
Gitk is a git commit viewer with the following features:
* Clear and compact representation of the commit graph
* Displays headline, author and date of each commit in the
summary window
* Displays the full details of one commit - the comments,
list of files and colorized diff - in the details window
* Find function for searching through commits
* Displays the SHA1 ID of the selected commit and makes it
the X selection so it can be pasted into other windows
* Convenient key bindings for scanning through each commit
in turn
Gitk passes its command-line arguments to git-rev-tree to allow you to
select the range of commits to display. With no arguments it will
display all the commits starting at HEAD.
The key bindings are:
up or p: select the commit on the next line up from the current one
down or n: select the commit on the next line down from the current one
pageup: scroll the commit summary window up one page
pagedown: scroll the commit summary window down one page
delete or backspace or b: scroll the details window up one page
space: scroll the details window down one page
u: scroll the details window up 18 lines
d: scroll the details window down 18 lines
f: move to the start of the next file diff in the details window
^F: search for commits matching the search string
^G or /: select the next commit matching the search string
^R or ?: select the previous commit matching the search string
^- or ^KP-: reduce the font size
^= or ^KP+: increase the font size
^Q: quit.
Features added since the last release include:
* Better error handling.
* Gitk now remembers the layout of the window, so if you adjust the
sizes of the panes to suit, then quit and restart, it should display
the panes in the proportions you have chosen.
* Instances of the search string are now highlighted in the details
window as well as the summary window.
* The circle diameter and line thickness now scale with the font size.
* Accommodates the new git-diff-tree output format.
Paul.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 13:05 gitk-1.0 released Paul Mackerras
@ 2005-05-19 13:24 ` Ingo Molnar
2005-05-19 13:30 ` Ingo Molnar
2005-05-19 22:32 ` Paul Mackerras
2005-05-19 23:13 ` Benjamin Herrenschmidt
` (2 subsequent siblings)
3 siblings, 2 replies; 14+ messages in thread
From: Ingo Molnar @ 2005-05-19 13:24 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
* Paul Mackerras <paulus@samba.org> wrote:
> I have released a new version of gitk. I got brave and called it 1.0
> and it is at:
>
> http://ozlabs.org/~paulus/gitk-1.0
very nice! Works well and it's pretty fast on a 2GHz P4.
a bugreport: when looking at the main git history, the following commit
seems to be rendered incorrectly:
211232bae64bcc60bbf5d1b5e5b2344c22ed767e
The "Octopus merge ..." text is incorrectly overlayed with a graph line.
here's a feature wishlist if you dont mind:
- the ability to copy & paste from all the windows would be nice. (e.g.
in the bugreport above i had to type down the "Octopus merge .." text
instead of pasting it from gitk)
- i guess this one is on your todo list: the history graph of a single
object (file).
- first window appearance on an uncached repository can be pretty slow
due to disk seeks - so it might make sense to display something (an
hourglass?) sooner - when i first started it i thought it hung. On
already cached repositories the window comes up immediately, and the
list of commits is updated dynamically.
(and the biggest missing feature of GIT right now is author +
last-commit annotated file viewing which could be integrated into gitk
a'ka BK's revtool: selecting a given line of the file would bring one to
that commit, etc.)
Ingo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 13:24 ` Ingo Molnar
@ 2005-05-19 13:30 ` Ingo Molnar
2005-05-19 22:32 ` Paul Mackerras
1 sibling, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2005-05-19 13:30 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
* Ingo Molnar <mingo@elte.hu> wrote:
> - the ability to copy & paste from all the windows would be nice. (e.g.
> in the bugreport above i had to type down the "Octopus merge .." text
> instead of pasting it from gitk)
scrap this one - the patch view window allows copy & paste, and the name
of the patch is included there too.
Ingo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 13:24 ` Ingo Molnar
2005-05-19 13:30 ` Ingo Molnar
@ 2005-05-19 22:32 ` Paul Mackerras
2005-05-20 11:22 ` Ingo Molnar
` (2 more replies)
1 sibling, 3 replies; 14+ messages in thread
From: Paul Mackerras @ 2005-05-19 22:32 UTC (permalink / raw)
To: Ingo Molnar; +Cc: git
Ingo Molnar writes:
> very nice! Works well and it's pretty fast on a 2GHz P4.
I'm glad you like it. :)
> The "Octopus merge ..." text is incorrectly overlayed with a graph line.
The patch below fixes that.
> - i guess this one is on your todo list: the history graph of a single
> object (file).
Yes. I was hoping that git-rev-tree would grow an option to do the
necessary selection of commits and produce a simplified graph. I
could do it in Tcl but it's probably better done in C.
> - first window appearance on an uncached repository can be pretty slow
> due to disk seeks - so it might make sense to display something (an
> hourglass?) sooner - when i first started it i thought it hung. On
> already cached repositories the window comes up immediately, and the
> list of commits is updated dynamically.
The problem is that git-rev-tree HEAD doesn't output anything until it
has read all the relevant commits, which can involve a lot of disk
seeks. I put the "Reading commits..." message in to indicate that
something was happening, but your hourglass cursor suggestion is a
good one. It looks like git-rev-list might be better suited to what I
want, actually.
> (and the biggest missing feature of GIT right now is author +
> last-commit annotated file viewing which could be integrated into gitk
> a'ka BK's revtool: selecting a given line of the file would bring one to
> that commit, etc.)
Yes, indeed. I'll have to think about how to do it in a responsive
fashion, since getting the necessary information involves reading all
the commits and all the tree objects back to the beginning of time,
AFAICS. Gitk currently only reads the tree objects when you select a
commit, and it does that asynchronously; when you select a commit, it
immediately displays the commit message and starts a git-diff-tree
process. When the output from git-diff-tree arrives, it updates the
listbox and then (if you haven't selected another commit in the
meantime) starts a git-diff-tree -p to get the diff. As the output
from git-diff-tree arrives, it is colorized and placed in the details
window. That's why you can let the up or down key autorepeat and gitk
doesn't get hopelessly behind.
Another thing I want to do is find a way to display the deleted lines
in the annotated file listing. One thing I found quite frustrating
with bk revtool was trying to find which changeset deleted some
particular lines of code. I was basically reduced to binary searching
through the changesets - and with a large source file, just finding
the place to check in the annotated listing for each changeset was
time-consuming and error-prone in itself.
Paul.
diff -urN gitk-1.0/gitk gitk
--- gitk-1.0/gitk 2005-05-20 08:17:18.000000000 +1000
+++ gitk 2005-05-20 08:09:38.000000000 +1000
@@ -563,6 +563,9 @@
-fill $ofill -outline black -width 1]
$canv raise $t
set xt [expr $canvx0 + $nlines * $linespc]
+ if {$nparents($id) > 2} {
+ set xt [expr {$xt + ($nparents($id) - 2) * $linespc}]
+ }
set headline [lindex $commitinfo($id) 0]
set name [lindex $commitinfo($id) 1]
set date [lindex $commitinfo($id) 2]
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 13:05 gitk-1.0 released Paul Mackerras
2005-05-19 13:24 ` Ingo Molnar
@ 2005-05-19 23:13 ` Benjamin Herrenschmidt
2005-05-20 4:55 ` Frank Sorenson
2005-05-20 1:10 ` walt
2005-05-28 11:47 ` Ingo Molnar
3 siblings, 1 reply; 14+ messages in thread
From: Benjamin Herrenschmidt @ 2005-05-19 23:13 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
On Thu, 2005-05-19 at 23:05 +1000, Paul Mackerras wrote:
> I have released a new version of gitk. I got brave and called it 1.0
> and it is at:
>
> http://ozlabs.org/~paulus/gitk-1.0
>
> (that's the actual script itself).
>
> Gitk is a git commit viewer with the following features:
>
> * Clear and compact representation of the commit graph
> * Displays headline, author and date of each commit in the
> summary window
> * Displays the full details of one commit - the comments,
> list of files and colorized diff - in the details window
> * Find function for searching through commits
> * Displays the SHA1 ID of the selected commit and makes it
> the X selection so it can be pasted into other windows
> * Convenient key bindings for scanning through each commit
> in turn
Cool !
Here's a feature request though: beeing able to type/paste a SHA1 in the
SHA1 ID field to "jump" to that commit :)
Ben.
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 13:05 gitk-1.0 released Paul Mackerras
2005-05-19 13:24 ` Ingo Molnar
2005-05-19 23:13 ` Benjamin Herrenschmidt
@ 2005-05-20 1:10 ` walt
2005-05-28 11:47 ` Ingo Molnar
3 siblings, 0 replies; 14+ messages in thread
From: walt @ 2005-05-20 1:10 UTC (permalink / raw)
To: git
Paul Mackerras wrote:
> I have released a new version of gitk. I got brave and called it 1.0
> and it is at:
>
> http://ozlabs.org/~paulus/gitk-1.0
.
.
.
Today, gitk works beautifully for me. Yesterday, though, I had a weird
first experience when it opened a very attractive tcl/tk interface which
displayed no text of any kind. I tried fiddling with the two menus you
provide, bit still no success.
I finally just gave up. When I tried gitk again today -- it was magic!
All the kernel tree appeared just as (I suppose) you intended.
As far as I know, I did nothing to change anything since yesterday.
Can you venture a guess why I had sucess today and failure yesterday?
Does gitk perhaps depend on a generated database of some kind before
it will work properly?
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 23:13 ` Benjamin Herrenschmidt
@ 2005-05-20 4:55 ` Frank Sorenson
0 siblings, 0 replies; 14+ messages in thread
From: Frank Sorenson @ 2005-05-20 4:55 UTC (permalink / raw)
To: Benjamin Herrenschmidt; +Cc: Paul Mackerras, git
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Benjamin Herrenschmidt wrote:
> Cool !
>
> Here's a feature request though: beeing able to type/paste a SHA1 in the
> SHA1 ID field to "jump" to that commit :)
Very nice. I really like gitk as well. In addition to pasting an sha1
in, how about pasting a tag?
Also, what about identifying tagged commits with a different color, a
star instead of just the round bullet, or some other identifier?
Frank
- --
Frank Sorenson - KD7TZK
Systems Manager, Computer Science Department
Brigham Young University
frank@tuxrocks.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFCjW2yaI0dwg4A47wRArsEAKCdkTBQEPD7yyb8ABiBg20nhdmKgACg2D2Y
W0ZxoOGTOspvrRczeEYN9mg=
=y2Z0
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 22:32 ` Paul Mackerras
@ 2005-05-20 11:22 ` Ingo Molnar
2005-05-20 11:33 ` Ingo Molnar
2005-05-20 18:18 ` Kari Hameenaho
2 siblings, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2005-05-20 11:22 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
* Paul Mackerras <paulus@samba.org> wrote:
> > (and the biggest missing feature of GIT right now is author +
> > last-commit annotated file viewing which could be integrated into gitk
> > a'ka BK's revtool: selecting a given line of the file would bring one to
> > that commit, etc.)
>
> Yes, indeed. I'll have to think about how to do it in a responsive
> fashion, since getting the necessary information involves reading all
> the commits and all the tree objects back to the beginning of time,
> AFAICS. [...]
i guess so. A possible solution seems to be to read every object
starting at the oldest one (assuming it's possible to get a list of
object IDs that are predecessors), and to split the oldest object up
into 'line' objects, attaching the (same) object ID to every line. Then
the algorithm would go forward in time and would process every diff from
that point on, and would add/remove line objects, attaching the new
object IDs as new lines get added. The resulting set of lines then
contain all the metadata needed (== object ID they originate from).
i dont think other SCMs can do this much faster: you need to go back to
the last (still relevant) version and have to process the deltas from
that point on. Delta-based formats would be somewhat faster and easier
to process, but probably not that much faster in terms of IO overhead.
Ingo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 22:32 ` Paul Mackerras
2005-05-20 11:22 ` Ingo Molnar
@ 2005-05-20 11:33 ` Ingo Molnar
2005-05-20 18:18 ` Kari Hameenaho
2 siblings, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2005-05-20 11:33 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
* Paul Mackerras <paulus@samba.org> wrote:
> > - first window appearance on an uncached repository can be pretty slow
> > due to disk seeks - so it might make sense to display something (an
> > hourglass?) sooner - when i first started it i thought it hung. On
> > already cached repositories the window comes up immediately, and the
> > list of commits is updated dynamically.
>
> The problem is that git-rev-tree HEAD doesn't output anything until it
> has read all the relevant commits, which can involve a lot of disk
> seeks. I put the "Reading commits..." message in to indicate that
> something was happening, but your hourglass cursor suggestion is a
> good one. It looks like git-rev-list might be better suited to what I
> want, actually.
it was quite a couple of seconds to get the empty windows with the
'Reading commits...' message. It was this first period of time (5-10
seconds?) which i mistook for a hang. Perhaps this is some Tk startup
slowness, not a genuine gitk issue?
> + if {$nparents($id) > 2} {
> + set xt [expr {$xt + ($nparents($id) - 2) * $linespc}]
> + }
thanks, this fix did the trick.
Ingo
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 22:32 ` Paul Mackerras
2005-05-20 11:22 ` Ingo Molnar
2005-05-20 11:33 ` Ingo Molnar
@ 2005-05-20 18:18 ` Kari Hameenaho
2005-05-20 19:07 ` Linus Torvalds
2 siblings, 1 reply; 14+ messages in thread
From: Kari Hameenaho @ 2005-05-20 18:18 UTC (permalink / raw)
To: git
Paul Mackerras wrote:
>
> Yes, indeed. I'll have to think about how to do it in a responsive
> fashion, since getting the necessary information involves reading all
> the commits and all the tree objects back to the beginning of time,
> AFAICS.
Maybe its not necessary to go back all the way. It is possible to look only
commits between 2.6.12-rc4 and 2.6.12-rc3, like follows (needs just a few
fixes to gitk):
gitk -d $(commit-id v2.6.12-rc4) ^$(parent-id $(commit-id v2.6.12-rc3))
--
Kari Hämeenaho
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-20 18:18 ` Kari Hameenaho
@ 2005-05-20 19:07 ` Linus Torvalds
2005-05-21 6:40 ` Jon Seymour
0 siblings, 1 reply; 14+ messages in thread
From: Linus Torvalds @ 2005-05-20 19:07 UTC (permalink / raw)
To: Kari Hameenaho; +Cc: git
On Fri, 20 May 2005, Kari Hameenaho wrote:
> Paul Mackerras wrote:
> >
> > Yes, indeed. I'll have to think about how to do it in a responsive
> > fashion, since getting the necessary information involves reading all
> > the commits and all the tree objects back to the beginning of time,
> > AFAICS.
>
> Maybe its not necessary to go back all the way. It is possible to look only
> commits between 2.6.12-rc4 and 2.6.12-rc3, like follows (needs just a few
> fixes to gitk):
>
> gitk -d $(commit-id v2.6.12-rc4) ^$(parent-id $(commit-id v2.6.12-rc3))
But that _does_ actually go back all the way in time.
It does so inside of "git-rev-tree", and that's why git-rev-tree is slow.
What you can do, is to special-case certain things that git-rev-tree does,
and try to do them more efficiently.
For example, git-rev-list is much nicer to use, exactly because it does
only one very particular special case of what git-rev-tree does, ie "list
all revisions". Because it's a special case, you can do it incrementally.
Similarly, you _can_ actually do "git-rev-tree HEAD ^OLD_HEAD" as a
special case too, and do it "as incrementally as possible". It's more
complicated than the (trivial) git-rev-list, so I've not actually done it,
but it's clearly important enough that I _should_ do it.
The way to do it "as incrementally as possible" is to start with the
HEAD, and walk down and print out everything until you hit OLD_HEAD or a
merge. Then:
- If you hit OLD_HEAD, you're done.
- If you hit a merge, you know the merge itself wasn't in OLD_HEAD, but
now one of the sides might contain OLD_HEAD which might have a merge
pointing to the other side, so you don't know if you should show any of
the commits below it. What you do is:
- walk down both paths in date order - like rev-list does - until you
_do_ hit OLD_HEAD. Here "date order" ends up being an approximation
for "how do I avoid going down a long chain that ends up already
being pointed to by OLD_HEAD"
- mark everything reachable from OLD_HEAD as being uninteresting (aka
"seen"), and everything that reaches OLD_HEAD as being interesting
and print it out.
- as long as there are commits that aren't marked either uninteresting
_or_ interesting (they are unknown) continue to walk the commit
chain in date order, where the parent(s) of an uninteresting commit
is always uninteresting.
- eventually, you'll have no unknowns left, and you can stop.
In the worst case, you'll end up walking back to the root (somebody did
development against the root, and then merged that development up after
OLD_HEAD), but that ends up being increasingly unlikely as the project
grows, so in practice this kind of algorithm will always end up doign work
that is comparable to the amount of development between OLD_HEAD and HEAD,
and independent of the total history size.
I might have missed some detail in the above, but it should be _fairly_
straightforward to start with rev-list.c and make it generate the lists of
"interesting", "uninteresting" and "unknown" commits and do the above.
Is anybody up for coding up this small exercise in graph traversal?
Linus
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-20 19:07 ` Linus Torvalds
@ 2005-05-21 6:40 ` Jon Seymour
2005-05-21 16:35 ` Linus Torvalds
0 siblings, 1 reply; 14+ messages in thread
From: Jon Seymour @ 2005-05-21 6:40 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Kari Hameenaho, git
> - mark everything reachable from OLD_HEAD as being uninteresting (aka
> "seen"), and everything that reaches OLD_HEAD as being interesting
> and print it out.
Won't this step end up traversing back to the root anyway?
jon.
--
homepage: http://www.zeta.org.au/~jon/
blog: http://orwelliantremors.blogspot.com/
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-21 6:40 ` Jon Seymour
@ 2005-05-21 16:35 ` Linus Torvalds
0 siblings, 0 replies; 14+ messages in thread
From: Linus Torvalds @ 2005-05-21 16:35 UTC (permalink / raw)
To: jon; +Cc: Kari Hameenaho, git
On Sat, 21 May 2005, Jon Seymour wrote:
>
> > - mark everything reachable from OLD_HEAD as being uninteresting (aka
> > "seen"), and everything that reaches OLD_HEAD as being interesting
> > and print it out.
>
> Won't this step end up traversing back to the root anyway?
Sorry, bad wording on my part. Here "reachable" means only withing the
context of "currently parsed", not "globally reachable".
So no, the reachability tests would not traverse anywhere new.
Linus
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: gitk-1.0 released
2005-05-19 13:05 gitk-1.0 released Paul Mackerras
` (2 preceding siblings ...)
2005-05-20 1:10 ` walt
@ 2005-05-28 11:47 ` Ingo Molnar
3 siblings, 0 replies; 14+ messages in thread
From: Ingo Molnar @ 2005-05-28 11:47 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
another small bug: if you click into the main window _before_ the commit
list has been fully generated (i.e. into the empty window) then all
sorts of error messages pop up. ("Cant use empty string ...")
Ingo
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2005-05-28 11:45 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 13:05 gitk-1.0 released Paul Mackerras
2005-05-19 13:24 ` Ingo Molnar
2005-05-19 13:30 ` Ingo Molnar
2005-05-19 22:32 ` Paul Mackerras
2005-05-20 11:22 ` Ingo Molnar
2005-05-20 11:33 ` Ingo Molnar
2005-05-20 18:18 ` Kari Hameenaho
2005-05-20 19:07 ` Linus Torvalds
2005-05-21 6:40 ` Jon Seymour
2005-05-21 16:35 ` Linus Torvalds
2005-05-19 23:13 ` Benjamin Herrenschmidt
2005-05-20 4:55 ` Frank Sorenson
2005-05-20 1:10 ` walt
2005-05-28 11:47 ` Ingo Molnar
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).