{"thread":{"id":"43580","subject":"Re: Topic descriptions","startedAt":"2006-12-06T21:53:28Z","lastAt":"2006-12-09T01:11:48Z","messageCount":7,"participants":["Junio C Hamano","Martin Waitz","Andy Parkins","Robin Rosenberg","Sam Vilain"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"295973","messageId":"200612062153.30639.andyparkins@gmail.com","threadId":"43580","inReplyTo":null,"subject":"Topic descriptions","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2006-12-06T21:53:28Z","receivedAt":"2006-12-06T21:53:28Z","isPatch":false,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"Hello,\n\nI was just reading Junio's \"what's cooking\" summary, and it occurred to me \nthat it would be excellent if git had support for this sort of thing.\n\nIt seems fairly easy - it wouldn't have to be versioned information.  Could we \nsimply make .git/refs files be more flexible in their syntax.\n\n-----\n<sha1>\n<anything at all>\n-----\n\nI don't know where the UI would go; but it would let Junio generate his what's \ncooking emails with cat .git/refs/*/*\n\nJust an idea...\n\n\nAndy\n-- \nDr Andrew Parkins, M Eng (Hons), AMIEE\n"},{"id":"295697","messageId":"7v4ps8y7un.fsf@assigned-by-dhcp.cox.net","threadId":"43580","inReplyTo":"200612062153.30639.andyparkins@gmail.com","subject":"Re: Topic descriptions","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-06T22:31:28Z","receivedAt":"2006-12-06T22:31:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Parkins <andyparkins@gmail.com> writes:\n\n> -----\n> <sha1>\n> <anything at all>\n> -----\n>\n> I don't know where the UI would go; but it would let Junio generate his what's \n> cooking emails with cat .git/refs/*/*\n\nI think the right place to store that <anything at all>\ninformation is per-branch configuration item.  Perhaps:\n\n\t[branch \"ap/clone-origin\"]\n        description = we talk about what this thing does and \\\n        what the current status of it is.\n\nI am unlikely to use such a thing for the \"What's in\" message,\nthough.  The part that talks about \"what the current status is\"\nis much easier to write when I need to talk about \"the current\";\notherwise I'd be forced to remember to think if I need to update\nthe information, every time I touch topic branches.\n\nBut that description thing would be useful in gitweb, for\nexample.\n"},{"id":"298175","messageId":"200612070837.16412.andyparkins@gmail.com","threadId":"43580","inReplyTo":"7v4ps8y7un.fsf@assigned-by-dhcp.cox.net","subject":"Re: Topic descriptions","fromName":"Andy Parkins","fromEmail":"andyparkins@gmail.com","sentAt":"2006-12-07T08:37:13Z","receivedAt":"2006-12-07T08:37:13Z","isPatch":false,"sender":{"key":"andyparkins@gmail.com","avatar":null},"body":"On Wednesday 2006, December 06 22:31, Junio C Hamano wrote:\n\n> I am unlikely to use such a thing for the \"What's in\" message,\n> though.  The part that talks about \"what the current status is\"\n> is much easier to write when I need to talk about \"the current\";\n> otherwise I'd be forced to remember to think if I need to update\n> the information, every time I touch topic branches.\n\nIt wasn't so much the what's current - as you say that would be fairly \nridiculous as it's so fluid.  It was more a description of the topic.  I've \ngot tonnes of branches where I have quickly thought of an idea and started \nwork on it, only to get bored and move on.  Describing a topic in such a \nshort space as \"ap/short-name\" is hard.\n\nThe actual place it's stored isn't really relevant, more that I could see a \nuse for it.  If it's going in the config I suppose all it needs is a \nmagic \"and so it shall be\" hand wave.  It doesn't require any new code does \nit?\n\n\nAndy\n-- \nDr Andrew Parkins, M Eng (Hons), AMIEE\n"},{"id":"295975","messageId":"7v3b7suk0p.fsf@assigned-by-dhcp.cox.net","threadId":"43580","inReplyTo":"200612070837.16412.andyparkins@gmail.com","subject":"Re: Topic descriptions","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-12-07T09:34:30Z","receivedAt":"2006-12-07T09:34:30Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Andy Parkins <andyparkins@gmail.com> writes:\n\n> The actual place it's stored isn't really relevant, more that I could see a \n> use for it.  If it's going in the config I suppose all it needs is a \n> magic \"and so it shall be\" hand wave.\n\nI now have this in my .git/config:\n\n-- >8 -- snippet from .git/config -- >8 --\n[branch \"ap/clone-origin\"]\n\tdescription = set up a cloned repository with friendlier defaults.\n\n[branch \"jc/3way\"]\n\tdescription = use three-way merge to preserve local changes upon branch switch and fast forward.\n-- 8< --\n\nand have the script attached at the end.  I can say:\n\n\t$ git-topic --base=master\n\nto get something like that per-topic summary I sent out earlier.\nThe default $base is set to 'next' because usually I am\ninterested in keeping track of what could be merged but not yet\nto next.\n\nHopefully gitweb (and perhaps gitk) can follow suit to read the\nbranch description from the same place.\n\n-- >8 -- git-topic.perl -- >8 --\n#!/usr/bin/perl -w\n#\n# Copyright (c) 2006 Junio C Hamano\n#\n\nuse strict;\nuse Getopt::Long;\n\nmy $topic_pattern = '??/*';\nmy $base = 'next';\nmy @stage = qw(next pu);\nmy @mark = ('.', '?', '-', '+');\nmy $all = 0;\n\nmy @custom_stage;\nmy @custom_mark;\nGetOptions(\"topic=s\" => \\$topic_pattern,\n\t   \"base=s\" => \\$base,\n\t   \"stage=s\" => \\@custom_stage,\n\t   \"mark=s\" => \\@custom_mark,\n\t   \"all!\" => \\$all)\n    or die;\n\nif (@custom_stage) { @stage = @custom_stage; }\nif (@custom_mark) { @mark = @custom_mark; }\n\nsub read_revs_short {\n\tmy ($bottom, $top) = @_;\n\tmy @revs;\n\topen(REVS, '-|', qw(git rev-list --no-merges), \"$bottom..$top\")\n\t    or die;\n\twhile (<REVS>) {\n\t\tchomp;\n\t\tpush @revs, $_;\n\t}\n\tclose(REVS);\n\treturn @revs;\n}\n\nsub read_revs {\n\tmy ($bottom, $top, $mask) = @_;\n\tmy @revs;\n\topen(REVS, '-|', qw(git rev-list --pretty=oneline --no-merges),\n\t     \"$bottom..$top\")\n\t    or die;\n\twhile (<REVS>) {\n\t\tchomp;\n\t\tmy ($sha1, $topic) = /^([0-9a-f]{40}) (.*)$/;\n\t\tpush @revs, [$sha1, $topic, $mask];\n\t}\n\tclose(REVS);\n\treturn @revs;\n}\n\nsub describe_topic {\n\tmy ($topic) = @_;\n\topen(CONF, '-|', qw(git repo-config --get),\n\t\t\"branch.$topic.description\")\n\t\tor die;\n\tmy $it = join('',<CONF>);\n\tclose(CONF);\n\tchomp($it);\n\tif ($it) {\n\t\twrap_print(\"  $it\");\n\t}\n}\n\nsub wrap_print {\n\tmy ($string) = @_;\n\tformat STDOUT =\n~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\t$string\n ~~^<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<\n\t$string\n.\n\twrite;\n}\n\nopen(TOPIC, '-|', qw(git for-each-ref),\n\t'--sort=-authordate',\n\t'--format=%(objectname) %(authordate) %(refname)',\n\t\"refs/heads/$topic_pattern\")\n\tor die;\n\nwhile (<TOPIC>) {\n\tchomp;\n\tmy ($sha1, $date, $topic) = m|^([0-9a-f]{40})\\s(.*?)\\srefs/heads/(.+)$|\n\t\tor next;\n\tmy @revs = read_revs($base, $sha1, (1<<@stage)-1);\n\tnext unless (@revs || $all);\n\n\tmy %revs = map { $_->[0] => $_ } @revs; # fast index\n\tfor (my $i = 0; $i < @stage; $i++) {\n\t\tfor my $item (read_revs_short($stage[$i], $sha1)) {\n\t\t\tif (exists $revs{$item}) {\n\t\t\t\t$revs{$item}[2] &= ~(1 << $i);\n\t\t\t}\n\t\t}\n\t}\n\tprint \"* $topic ($date)\\n\";\n\tdescribe_topic($topic);\n\tfor my $item (@revs) {\n\t\tmy $mark = $item->[2];\n\t\tif ($mark < @mark) {\n\t\t\t$mark = $mark[$mark];\n\t\t}\n\t\twrap_print(\"$mark $item->[1]\");\n\t}\n}\n"},{"id":"297713","messageId":"200612071145.59071.robin.rosenberg.lists@dewire.com","threadId":"43580","inReplyTo":"200612070837.16412.andyparkins@gmail.com","subject":"Re: Topic descriptions","fromName":"Robin Rosenberg","fromEmail":"robin.rosenberg.lists@dewire.com","sentAt":"2006-12-07T10:45:57Z","receivedAt":"2006-12-07T10:45:57Z","isPatch":false,"sender":{"key":"robin.rosenberg@dewire.com","avatar":"https://avatars.githubusercontent.com/u/46357?v=4"},"body":"torsdag 07 december 2006 09:37 skrev Andy Parkins:\n> On Wednesday 2006, December 06 22:31, Junio C Hamano wrote:\n> > I am unlikely to use such a thing for the \"What's in\" message,\n> > though.  The part that talks about \"what the current status is\"\n> > is much easier to write when I need to talk about \"the current\";\n> > otherwise I'd be forced to remember to think if I need to update\n> > the information, every time I touch topic branches.\n>\n> It wasn't so much the what's current - as you say that would be fairly\n> ridiculous as it's so fluid.  It was more a description of the topic.  I've\n> got tonnes of branches where I have quickly thought of an idea and started\n> work on it, only to get bored and move on.  Describing a topic in such a\n> short space as \"ap/short-name\" is hard.\n\nYour situation sounds similiar to mine, but I don't use regular git branches \nmuch. Rather I use stacked git instead. Stgit's patches can be though of as \nvirtual branches. Instead of creating a dozen branches I have a dozen commits \nmanaged by stgit that I can choose from (and combine) easily, creating and \ndestroying private \"branches\".\n\n"},{"id":"295824","messageId":"20061207115552.GC10468@admingilde.org","threadId":"43580","inReplyTo":"7v4ps8y7un.fsf@assigned-by-dhcp.cox.net","subject":"Re: Topic descriptions","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-12-07T11:55:52Z","receivedAt":"2006-12-07T11:55:52Z","isPatch":false,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Wed, Dec 06, 2006 at 02:31:28PM -0800, Junio C Hamano wrote:\n> But that description thing would be useful in gitweb, for\n> example.\n\nAnd it could be useful to automatically generate the summary for\nplease-pull mails or for the [0/N] patch introduction mail.\n\n-- \nMartin Waitz\n"},{"id":"297955","messageId":"457A0D54.80802@vilain.net","threadId":"43580","inReplyTo":"7v4ps8y7un.fsf@assigned-by-dhcp.cox.net","subject":"Re: Topic descriptions","fromName":"Sam Vilain","fromEmail":"sam@vilain.net","sentAt":"2006-12-09T01:11:48Z","receivedAt":"2006-12-09T01:11:48Z","isPatch":false,"sender":{"key":"sam@vilain.net","avatar":"https://gravatar.com/avatar/8fc840ca854dbf6f7065b4335e3b934951c1dca3b11db688e95e471901f8f4a8?d=mp&s=160"},"body":"Junio C Hamano wrote:\n> I think the right place to store that <anything at all>\n> information is per-branch configuration item.  Perhaps:\n> \n> \t[branch \"ap/clone-origin\"]\n>         description = we talk about what this thing does and \\\n>         what the current status of it is.\n> \n> I am unlikely to use such a thing for the \"What's in\" message,\n> though.  The part that talks about \"what the current status is\"\n> is much easier to write when I need to talk about \"the current\";\n> otherwise I'd be forced to remember to think if I need to update\n> the information, every time I touch topic branches.\n\nAnd this information could even be put into the commit message of the\nmerge commit.\n\ngitweb/repo could give a \"dashboard\" of feature branches;\n\n  - creator\n  - aim/description of feature branch\n  - (computed) mergability with master/trunk/etc (perhaps\n    config \"merge target(s)\")\n  - whether tests are passing on this branch (obviously not a\n    git-core feature, but a useful thing to know)\n  - how many new tests are introduced by this branch.\n\nSome ideas that occurred from watching Martin Pool's talk on managing\ndistributed VCS with bzr, and the Patch Queue Manager.\n\nSome people might like to include all of the above information in the\nmerge commit to close the branch, others just the non-redundant information.\n\nSam.\n"}]}