{"thread":{"id":"1448","subject":"gitk \"parent information\" in commit window","startedAt":"2005-08-07T20:58:56Z","lastAt":"2005-08-08T03:19:11Z","messageCount":6,"participants":["Linus Torvalds","Junio C Hamano","Paul Mackerras","A Large Angry SCM"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"6914","messageId":"Pine.LNX.4.58.0508071351150.3258@g5.osdl.org","threadId":"1448","inReplyTo":null,"subject":"gitk \"parent information\" in commit window","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-08-07T20:58:56Z","receivedAt":"2005-08-07T20:58:56Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\nThis adds a useful \"Parent:\" line to the git commit information window.\n\nIt looks something like this (from the infamous octopus merge):\n\n\tAuthor: Junio C Hamano <junkio@cox.net>  2005-05-05 16:16:54\n\tCommitter: Junio C Hamano <junkio@cox.net>  2005-05-05 16:16:54\n\tParent: fc54a9c30ccad3fde5890d2c0ca2e2acc0848fbc  (Update git-apply-patch-script ...)\n\tParent: 9e30dd7c0ecc9f10372f31539d0122db97418353  (Make git-prune-script executa ...)\n\tParent: c4b83e618f1df7d8ecc9392fa40e5bebccbe6b5a  (Do not write out new index if ...)\n\tParent: 660265909fc178581ef327076716dfd3550e6e7b  (diff-cache shows differences  ...)\n\tParent: b28858bf65d4fd6d8bb070865518ec43817fe7f3  (Update diff engine for symlin ...)\n\t\n\t    Octopus merge of the following five patches.\n\t    \n\t      Update git-apply-patch-script for symbolic links.\n\t      Make git-prune-script executable again.\n\t      Do not write out new index if nothing has changed.\n\t      diff-cache shows differences for unmerged paths without --cache.\n\t      Update diff engine for symlinks stored in the cache.\n\t    \n\t    Signed-off-by: Junio C Hamano <junkio@cox.net>\n\nwhere all the parent commit ID's are clickable, because the new lines are \nadded as part of the \"comment\" string, and thus the regular clickability \nthing will match them automatically.\n\nI think this is good. And my random-tcl-monkey-skills are clearly getting \nbetter (although it's perfectly possible that somebody who actually knows \nwhat he is doing would have done things differently).\n\nSigned-off-by: Linus Torvalds <torvalds@osdl.org>\n---\n[ Btw, the patch was generated against a tree that had Paul's hovering \n  patches merged. Junio, I don't think you've merged that yet, so this may \n  apply better to Paul's tree than to standard git. But I _think_ it will \n  apply cleanly to either one ]\n\ndiff --git a/gitk b/gitk\n--- a/gitk\n+++ b/gitk\n@@ -1799,9 +1799,21 @@ proc selectline {l isnew} {\n \t}\n \t$ctext insert end \"\\n\"\n     }\n-    $ctext insert end \"\\n\"\n+ \n     set commentstart [$ctext index \"end - 1c\"]\n-    set comment [lindex $info 5]\n+    set comment {}\n+    foreach p $parents($id) {\n+\tset l \"...\"\n+\tif {[info exists commitinfo($p)]} {\n+\t    set l [lindex $commitinfo($p) 0]\n+\t    if {[string length $l] > 32} {\n+\t\tset l \"[string range $l 0 28] ...\"\n+\t    }\n+\t}\n+\tappend comment \"Parent: $p  ($l)\\n\"\n+    }\n+    append comment \"\\n\"\n+    append comment [lindex $info 5]\n     $ctext insert end $comment\n     $ctext insert end \"\\n\"\n \n"},{"id":"6915","messageId":"7v4qa1v44e.fsf@assigned-by-dhcp.cox.net","threadId":"1448","inReplyTo":"Pine.LNX.4.58.0508071351150.3258@g5.osdl.org","subject":"Re: gitk \"parent information\" in commit window","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-07T21:17:21Z","receivedAt":"2005-08-07T21:17:21Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Linus Torvalds <torvalds@osdl.org> writes:\n\n> [ Btw, the patch was generated against a tree that had Paul's hovering \n>   patches merged. Junio, I don't think you've merged that yet, so this may \n>   apply better to Paul's tree than to standard git. But I _think_ it will \n>   apply cleanly to either one ]\n\nThanks.  Since Paul seems to be quite responsive, I'd prefer to\nkeep pulling from his tree.  I just pulled the hovering patches\nfrom his tree and was about to push things out.\n"},{"id":"6917","messageId":"17142.37044.108962.189983@cargo.ozlabs.ibm.com","threadId":"1448","inReplyTo":"Pine.LNX.4.58.0508071351150.3258@g5.osdl.org","subject":"Re: gitk \"parent information\" in commit window","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2005-08-07T22:52:36Z","receivedAt":"2005-08-07T22:52:36Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Linus Torvalds writes:\n\n> This adds a useful \"Parent:\" line to the git commit information window.\n\nCool!  Applied and pushed out.\n\nI have been thinking about adding dialog windows to allow the user to\nselect which repository and which range of commits they want to look at.\nDo you think that would be useful for you?\n\nRegards,\nPaul.\n"},{"id":"6918","messageId":"42F6A139.1060209@gmail.com","threadId":"1448","inReplyTo":"17142.37044.108962.189983@cargo.ozlabs.ibm.com","subject":"Re: gitk \"parent information\" in commit window","fromName":"A Large Angry SCM","fromEmail":"gitzilla@gmail.com","sentAt":"2005-08-08T00:03:05Z","receivedAt":"2005-08-08T00:03:05Z","isPatch":false,"sender":{"key":"gitzilla@gmail.com","avatar":"https://gravatar.com/avatar/354625c442439908ff3dd99757dee330e29e9df7847472384faf7a00add247fb?d=mp&s=160"},"body":"Paul Mackerras wrote:\n...\n> I have been thinking about adding dialog windows to allow the user to\n> select which repository and which range of commits they want to look at.\n> Do you think that would be useful for you?\n\nYes!\n"},{"id":"6919","messageId":"7vfytlnue7.fsf@assigned-by-dhcp.cox.net","threadId":"1448","inReplyTo":"17142.37044.108962.189983@cargo.ozlabs.ibm.com","subject":"Re: gitk \"parent information\" in commit window","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-08-08T00:29:20Z","receivedAt":"2005-08-08T00:29:20Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Paul Mackerras <paulus@samba.org> writes:\n\n> Linus Torvalds writes:\n>\n>> This adds a useful \"Parent:\" line to the git commit information window.\n>\n> Cool!  Applied and pushed out.\n\nThanks.  Merged and pushed out.\n\n> I have been thinking about adding dialog windows to allow the user to\n> select which repository and which range of commits they want to look at.\n> Do you think that would be useful for you?\n\n\"Which repository to look at\" would be like restarting if you\nneed to lose history information, in which case it would not be\nso useful at least for me (an extra command line option to limit\nthe range with specifying GIT_DIR environment variable would\nwork equally well).  If you can do that without losing history\nwhen the new repository to look at is the same as the old one,\nor similar to the old one, then that would be useful.\n\nAfter starting up, without losing history information, if I can\ntell it to re-read the refs, because I made some changes to the\nrepository while gitk was not looking, that would be very\nuseful.  But I hope your \"switching repository\" logic would do\nexactly that when I tell it to switch to the same repository.\n\nIf there was an option, either runtime configurable or command\nline, to cause gitk slurp not just refs/heads and refs/tags but\neverything under refs/* recursively, that would help visualizing\nthe bisect status.  bisect creates bunch of commit object names\nin refs/bisect.\n\nIf you can pop-up a transient window that shows the tag object\ncomments when I hover over a tag icon for 2 seconds, and remove\nthat transient window when stepping outside, that would be a\nuseful addition.  I do not currently see any way to inspect the\ntag itself, not the commit that is pointed at by the tag.\n"},{"id":"6920","messageId":"42F6CF2F.9010507@gmail.com","threadId":"1448","inReplyTo":"Pine.LNX.4.58.0508071351150.3258@g5.osdl.org","subject":"Re: gitk \"parent information\" in commit window","fromName":"A Large Angry SCM","fromEmail":"gitzilla@gmail.com","sentAt":"2005-08-08T03:19:11Z","receivedAt":"2005-08-08T03:19:11Z","isPatch":false,"sender":{"key":"gitzilla@gmail.com","avatar":"https://gravatar.com/avatar/354625c442439908ff3dd99757dee330e29e9df7847472384faf7a00add247fb?d=mp&s=160"},"body":"Linus Torvalds wrote:\n> This adds a useful \"Parent:\" line to the git commit information window.\n> \n> It looks something like this (from the infamous octopus merge):\n> \n> \tAuthor: Junio C Hamano <junkio@cox.net>  2005-05-05 16:16:54\n> \tCommitter: Junio C Hamano <junkio@cox.net>  2005-05-05 16:16:54\n> \tParent: fc54a9c30ccad3fde5890d2c0ca2e2acc0848fbc  (Update git-apply-patch-script ...)\n> \tParent: 9e30dd7c0ecc9f10372f31539d0122db97418353  (Make git-prune-script executa ...)\n> \tParent: c4b83e618f1df7d8ecc9392fa40e5bebccbe6b5a  (Do not write out new index if ...)\n> \tParent: 660265909fc178581ef327076716dfd3550e6e7b  (diff-cache shows differences  ...)\n> \tParent: b28858bf65d4fd6d8bb070865518ec43817fe7f3  (Update diff engine for symlin ...)\n> \t\n> \t    Octopus merge of the following five patches.\n> \t    \n> \t      Update git-apply-patch-script for symbolic links.\n> \t      Make git-prune-script executable again.\n> \t      Do not write out new index if nothing has changed.\n> \t      diff-cache shows differences for unmerged paths without --cache.\n> \t      Update diff engine for symlinks stored in the cache.\n> \t    \n> \t    Signed-off-by: Junio C Hamano <junkio@cox.net>\n> \n> where all the parent commit ID's are clickable, because the new lines are \n> added as part of the \"comment\" string, and thus the regular clickability \n> thing will match them automatically.\n\nThis new functionality is great except when it truncates the commit \ndescription needlessly.\n\nWhen running gitk full-screen on a large display, I have a commit \ninformation window that is much wider than needed for the truncated \nparent information. Leaving me with a lot of whitespace that should be \nused for the commit descriptions.\n\nOn a related nit: some of the diffs I'm viewing have lines longer than \nthe width of the commit information window and it's annoying that gitk \nwraps the line rather than providing horizontal scrolling.\n\nHow about implementing horizontal scrolling in the commit information \nwindow when the commit text or the diffs are wider than the window and \nnot truncating the commit descriptions?\n"}]}