* gitk "parent information" in commit window
@ 2005-08-07 20:58 Linus Torvalds
2005-08-07 21:17 ` Junio C Hamano
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Linus Torvalds @ 2005-08-07 20:58 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Git Mailing List
This adds a useful "Parent:" line to the git commit information window.
It looks something like this (from the infamous octopus merge):
Author: Junio C Hamano <junkio@cox.net> 2005-05-05 16:16:54
Committer: Junio C Hamano <junkio@cox.net> 2005-05-05 16:16:54
Parent: fc54a9c30ccad3fde5890d2c0ca2e2acc0848fbc (Update git-apply-patch-script ...)
Parent: 9e30dd7c0ecc9f10372f31539d0122db97418353 (Make git-prune-script executa ...)
Parent: c4b83e618f1df7d8ecc9392fa40e5bebccbe6b5a (Do not write out new index if ...)
Parent: 660265909fc178581ef327076716dfd3550e6e7b (diff-cache shows differences ...)
Parent: b28858bf65d4fd6d8bb070865518ec43817fe7f3 (Update diff engine for symlin ...)
Octopus merge of the following five patches.
Update git-apply-patch-script for symbolic links.
Make git-prune-script executable again.
Do not write out new index if nothing has changed.
diff-cache shows differences for unmerged paths without --cache.
Update diff engine for symlinks stored in the cache.
Signed-off-by: Junio C Hamano <junkio@cox.net>
where all the parent commit ID's are clickable, because the new lines are
added as part of the "comment" string, and thus the regular clickability
thing will match them automatically.
I think this is good. And my random-tcl-monkey-skills are clearly getting
better (although it's perfectly possible that somebody who actually knows
what he is doing would have done things differently).
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
[ Btw, the patch was generated against a tree that had Paul's hovering
patches merged. Junio, I don't think you've merged that yet, so this may
apply better to Paul's tree than to standard git. But I _think_ it will
apply cleanly to either one ]
diff --git a/gitk b/gitk
--- a/gitk
+++ b/gitk
@@ -1799,9 +1799,21 @@ proc selectline {l isnew} {
}
$ctext insert end "\n"
}
- $ctext insert end "\n"
+
set commentstart [$ctext index "end - 1c"]
- set comment [lindex $info 5]
+ set comment {}
+ foreach p $parents($id) {
+ set l "..."
+ if {[info exists commitinfo($p)]} {
+ set l [lindex $commitinfo($p) 0]
+ if {[string length $l] > 32} {
+ set l "[string range $l 0 28] ..."
+ }
+ }
+ append comment "Parent: $p ($l)\n"
+ }
+ append comment "\n"
+ append comment [lindex $info 5]
$ctext insert end $comment
$ctext insert end "\n"
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitk "parent information" in commit window
2005-08-07 20:58 gitk "parent information" in commit window Linus Torvalds
@ 2005-08-07 21:17 ` Junio C Hamano
2005-08-07 22:52 ` Paul Mackerras
2005-08-08 3:19 ` A Large Angry SCM
2 siblings, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2005-08-07 21:17 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List
Linus Torvalds <torvalds@osdl.org> writes:
> [ Btw, the patch was generated against a tree that had Paul's hovering
> patches merged. Junio, I don't think you've merged that yet, so this may
> apply better to Paul's tree than to standard git. But I _think_ it will
> apply cleanly to either one ]
Thanks. Since Paul seems to be quite responsive, I'd prefer to
keep pulling from his tree. I just pulled the hovering patches
from his tree and was about to push things out.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitk "parent information" in commit window
2005-08-07 20:58 gitk "parent information" in commit window Linus Torvalds
2005-08-07 21:17 ` Junio C Hamano
@ 2005-08-07 22:52 ` Paul Mackerras
2005-08-08 0:03 ` A Large Angry SCM
2005-08-08 0:29 ` Junio C Hamano
2005-08-08 3:19 ` A Large Angry SCM
2 siblings, 2 replies; 6+ messages in thread
From: Paul Mackerras @ 2005-08-07 22:52 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Git Mailing List
Linus Torvalds writes:
> This adds a useful "Parent:" line to the git commit information window.
Cool! Applied and pushed out.
I have been thinking about adding dialog windows to allow the user to
select which repository and which range of commits they want to look at.
Do you think that would be useful for you?
Regards,
Paul.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitk "parent information" in commit window
2005-08-07 22:52 ` Paul Mackerras
@ 2005-08-08 0:03 ` A Large Angry SCM
2005-08-08 0:29 ` Junio C Hamano
1 sibling, 0 replies; 6+ messages in thread
From: A Large Angry SCM @ 2005-08-08 0:03 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Git Mailing List
Paul Mackerras wrote:
...
> I have been thinking about adding dialog windows to allow the user to
> select which repository and which range of commits they want to look at.
> Do you think that would be useful for you?
Yes!
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitk "parent information" in commit window
2005-08-07 22:52 ` Paul Mackerras
2005-08-08 0:03 ` A Large Angry SCM
@ 2005-08-08 0:29 ` Junio C Hamano
1 sibling, 0 replies; 6+ messages in thread
From: Junio C Hamano @ 2005-08-08 0:29 UTC (permalink / raw)
To: git
Paul Mackerras <paulus@samba.org> writes:
> Linus Torvalds writes:
>
>> This adds a useful "Parent:" line to the git commit information window.
>
> Cool! Applied and pushed out.
Thanks. Merged and pushed out.
> I have been thinking about adding dialog windows to allow the user to
> select which repository and which range of commits they want to look at.
> Do you think that would be useful for you?
"Which repository to look at" would be like restarting if you
need to lose history information, in which case it would not be
so useful at least for me (an extra command line option to limit
the range with specifying GIT_DIR environment variable would
work equally well). If you can do that without losing history
when the new repository to look at is the same as the old one,
or similar to the old one, then that would be useful.
After starting up, without losing history information, if I can
tell it to re-read the refs, because I made some changes to the
repository while gitk was not looking, that would be very
useful. But I hope your "switching repository" logic would do
exactly that when I tell it to switch to the same repository.
If there was an option, either runtime configurable or command
line, to cause gitk slurp not just refs/heads and refs/tags but
everything under refs/* recursively, that would help visualizing
the bisect status. bisect creates bunch of commit object names
in refs/bisect.
If you can pop-up a transient window that shows the tag object
comments when I hover over a tag icon for 2 seconds, and remove
that transient window when stepping outside, that would be a
useful addition. I do not currently see any way to inspect the
tag itself, not the commit that is pointed at by the tag.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitk "parent information" in commit window
2005-08-07 20:58 gitk "parent information" in commit window Linus Torvalds
2005-08-07 21:17 ` Junio C Hamano
2005-08-07 22:52 ` Paul Mackerras
@ 2005-08-08 3:19 ` A Large Angry SCM
2 siblings, 0 replies; 6+ messages in thread
From: A Large Angry SCM @ 2005-08-08 3:19 UTC (permalink / raw)
To: Paul Mackerras; +Cc: Git Mailing List
Linus Torvalds wrote:
> This adds a useful "Parent:" line to the git commit information window.
>
> It looks something like this (from the infamous octopus merge):
>
> Author: Junio C Hamano <junkio@cox.net> 2005-05-05 16:16:54
> Committer: Junio C Hamano <junkio@cox.net> 2005-05-05 16:16:54
> Parent: fc54a9c30ccad3fde5890d2c0ca2e2acc0848fbc (Update git-apply-patch-script ...)
> Parent: 9e30dd7c0ecc9f10372f31539d0122db97418353 (Make git-prune-script executa ...)
> Parent: c4b83e618f1df7d8ecc9392fa40e5bebccbe6b5a (Do not write out new index if ...)
> Parent: 660265909fc178581ef327076716dfd3550e6e7b (diff-cache shows differences ...)
> Parent: b28858bf65d4fd6d8bb070865518ec43817fe7f3 (Update diff engine for symlin ...)
>
> Octopus merge of the following five patches.
>
> Update git-apply-patch-script for symbolic links.
> Make git-prune-script executable again.
> Do not write out new index if nothing has changed.
> diff-cache shows differences for unmerged paths without --cache.
> Update diff engine for symlinks stored in the cache.
>
> Signed-off-by: Junio C Hamano <junkio@cox.net>
>
> where all the parent commit ID's are clickable, because the new lines are
> added as part of the "comment" string, and thus the regular clickability
> thing will match them automatically.
This new functionality is great except when it truncates the commit
description needlessly.
When running gitk full-screen on a large display, I have a commit
information window that is much wider than needed for the truncated
parent information. Leaving me with a lot of whitespace that should be
used for the commit descriptions.
On a related nit: some of the diffs I'm viewing have lines longer than
the width of the commit information window and it's annoying that gitk
wraps the line rather than providing horizontal scrolling.
How about implementing horizontal scrolling in the commit information
window when the commit text or the diffs are wider than the window and
not truncating the commit descriptions?
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-08-08 3:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-07 20:58 gitk "parent information" in commit window Linus Torvalds
2005-08-07 21:17 ` Junio C Hamano
2005-08-07 22:52 ` Paul Mackerras
2005-08-08 0:03 ` A Large Angry SCM
2005-08-08 0:29 ` Junio C Hamano
2005-08-08 3:19 ` A Large Angry SCM
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).