{"thread":{"id":"392","subject":"[PATCh] jit-trackdown","startedAt":"2005-04-29T16:03:04Z","lastAt":"2005-04-29T22:09:18Z","messageCount":4,"participants":["David Greaves","Junio C Hamano","Daniel Barkalow"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"2137","messageId":"42725AB8.5090501@dgreaves.com","threadId":"392","inReplyTo":null,"subject":"[PATCh] jit-trackdown","fromName":"David Greaves","fromEmail":"david@dgreaves.com","sentAt":"2005-04-29T16:03:04Z","receivedAt":"2005-04-29T16:03:04Z","isPatch":true,"sender":{"key":"david@dgreaves.com","avatar":"https://gravatar.com/avatar/ca67bad50999edcdd137c9a65da2381557d175bea99ae956afdabc5785e42b79?d=mp&s=160"},"body":"Hi Junio\n\nExcellent tool :)\nShould really be cg-trackdown\n\nDavid\n\n\nThis patch allows the use of symbolic commits from Cogito's\n.git/refs/heads and tags structure eg:\n  jit-trackdown HEAD etc/db/schema.sql\nor\n  jit-trackdown v3.2 etc/db/schema.sql\n\n\nSigned-off-by: David Greaves <david@dgreaves.com>\n---\n\n\n--- jit-trackdown.orig  2005-04-29 16:57:40.278707704 +0100\n+++ jit-trackdown       2005-04-29 16:47:16.495483693 +0100\n@@ -1,6 +1,8 @@\n #!/bin/sh\n\n # Usage: jit-trackdown <commit> paths...\n+# <commit> can be the symbolic name HEAD\n+# or a tag or head identifier.\n\n tmp=.jit-trackdown.$$\n hits=$tmp-hits\n@@ -10,6 +12,14 @@\n tty -s || to_tty=:\n\n head=\"$1\"\n+if [ $head == \"HEAD\" ]; then\n+  head=$(cat .git/HEAD)\n+elif [ -f .git/refs/tags/$head ]; then\n+  head=$(cat .git/refs/tags/$head)\n+elif [ -f .git/refs/heads/$head ]; then\n+  head=$(cat .git/refs/heads/$head)\n+fi\n+\n shift\n rev-list \"$head\" |\n while read commit\n\n"},{"id":"2155","messageId":"7voebx4dyd.fsf@assigned-by-dhcp.cox.net","threadId":"392","inReplyTo":"42725AB8.5090501@dgreaves.com","subject":"Re: [PATCh] jit-trackdown","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-29T18:47:54Z","receivedAt":"2005-04-29T18:47:54Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"DG\" == David Greaves <david@dgreaves.com> writes:\n\nDG> Should really be cg-trackdown\n\nThanks for your kind words and the patch.\n\n     head=\"$1\"\n    +if [ $head == \"HEAD\" ]; then\n    +  head=$(cat .git/HEAD)\n    +elif [ -f .git/refs/tags/$head ]; then\n    +  head=$(cat .git/refs/tags/$head)\n    +elif [ -f .git/refs/heads/$head ]; then\n    +  head=$(cat .git/refs/heads/$head)\n    +fi\n    +\n\nI have been primarily looking at the plumbing side and not the\ntoilet side, and I still have not grokked cg-* yet.  That's why\nI did not do the right thing with these .git/refs/* stuff.  If\nthis were to become part of cg-* suite, I would recommend just\nusing $(commit-id) there, which should be the only one that\nneeds to know the .git/* structure convention.\n\nHave toilet side gitters reached a concensus (or semi-concensus)\non how things under .git/ should be organized?  Is there a\nsummary somewhere, something along the following lines?\n\n    In subdirectories under $GIT_PROJECT_TOP/.git, you have\n    files that have some special meaning to the Cogito layer.\n    These files are all 41-byte long, which stores a 40-byte\n    SHA1 with terminating newline.  What is stored in each\n    location is as follows:\n\n    .git/HEAD           \tHead commit object of the\n                                current tree. \n\n    .git/refs/heads/$ext\tHead commit object of the\n                                external tree $ext.  [*Q1*]\n\n    .git/refs/tags/$tag\t\tNamed Tag object. [*Q2*]\n\n    *Q1* What is the syntax and semantics rule for $ext, like\n         \"$ext matches '^[-A-Za-z0-9_]$' and is one of the\n         entries in .git/remotes\"?\n\n    *Q2* What is the syntax and semantics rule for $tag, like\n         \"$tag matches '^[-A-Za-z0-9_]$' and can be anything not\n         just commit\"?\n\n"},{"id":"2194","messageId":"Pine.LNX.4.21.0504291730000.30848-100000@iabervon.org","threadId":"392","inReplyTo":"7voebx4dyd.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCh] jit-trackdown","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2005-04-29T21:40:56Z","receivedAt":"2005-04-29T21:40:56Z","isPatch":true,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Fri, 29 Apr 2005, Junio C Hamano wrote:\n\n> Have toilet side gitters reached a concensus (or semi-concensus)\n> on how things under .git/ should be organized?  Is there a\n> summary somewhere, something along the following lines?\n\nI've made a proposal like the following:\n\n.git/\n  objects/    (traditional)\n  refs/       Directories of hex SHA1 + newline files\n    heads/    Commits which are heads of various sorts\n    tags/     Tags, by the tag name (or some local renaming of it)\n  info/       Other shared information\n    remotes\n  ...         Everything else isn't shared\n  HEAD        Symlink to refs/heads/<something>\n\nThe plumbing doesn't care what you name heads or tags, but expects things\nto be in heads to be commit objects and tags to be tag objects (which can\ntag whatever).\n\nAFAICT, there is general concensus that this is how things should be, but\nI haven't convinced Linus that the plumbing should know about anything\nother than objects/.\n\n\t-Daniel\n*This .sig left intentionally blank*\n\n"},{"id":"2206","messageId":"7vr7gt2q29.fsf@assigned-by-dhcp.cox.net","threadId":"392","inReplyTo":"Pine.LNX.4.21.0504291730000.30848-100000@iabervon.org","subject":"Re: [PATCh] jit-trackdown","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2005-04-29T22:09:18Z","receivedAt":"2005-04-29T22:09:18Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":">>>>> \"DB\" == Daniel Barkalow <barkalow@iabervon.org> writes:\n\nDB> I've made a proposal like the following:\n\nDB> .git/\nDB>   objects/    (traditional)\nDB>   refs/       Directories of hex SHA1 + newline files\nDB>     heads/    Commits which are heads of various sorts\nDB>     tags/     Tags, by the tag name (or some local renaming of it)\nDB>   info/       Other shared information\nDB>     remotes\nDB>   ...         Everything else isn't shared\nDB>   HEAD        Symlink to refs/heads/<something>\n\nThank you for clear description.\n\nI agree with Linus that plumbing does not need to know anything\nbut objects/.  What the porcelain passes fsck-cache to implement\nprune/garbage-collect does not concern it.  Of course it matters\nto the users and that is the reason why I asked.\n\n"}]}